Last active
June 27, 2020 06:27
-
-
Save Nimblz/215a7595765f031bf380b68524650b09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ReplicatedStorage = game:GetService("ReplicatedStorage") | |
local CollectionService = game:GetService("CollectionService") | |
local RunService = game:GetService("RunService") | |
local Workspace = game:GetService("Workspace") | |
local Players = game:GetService("Players") | |
local LocalPlayer = Players.LocalPlayer | |
local common = ReplicatedStorage.common | |
local hitIsYou = require(common.util.hitIsYou) | |
local ParticleCreator = require(common.ParticleCreator) | |
local SoundHelper = require(common.SoundHelper) | |
local root = script.Parent | |
local telegroup = root.telegroup | |
local keyslots = root.keyslots | |
local keysInOrder = { | |
keyslots.slots.Red, | |
keyslots.slots.Green, | |
keyslots.slots.Blue, | |
} | |
local isOpen = false | |
local function destroyKeySlot(slot) | |
coroutine.wrap(function() | |
CollectionService:RemoveTag(slot, "floaty") | |
ParticleCreator.Presets.explode(slot.CFrame) | |
SoundHelper.playSoundAt(slot.CFrame, "magic") | |
slot:Destroy() | |
end)() | |
end | |
local function openPortal() | |
if isOpen then return end | |
isOpen = true | |
local ts = game:GetService("TweenService") | |
-- animate key slots exploding | |
for _, slot in pairs(keysInOrder) do | |
destroyKeySlot(slot) | |
wait(0.3) | |
end | |
-- animate white sphere charging | |
keyslots:Destroy() | |
ParticleCreator.spawnParticle("vacuum", { | |
cFrame = root.Portal.Part.CFrame, | |
scale = root.Portal.Part.Size.Magnitude * 0.75, | |
amount = 1, | |
timeScale = 0.8, | |
}) | |
SoundHelper.playSoundAt(root.Portal.Part.CFrame, "portal_open", { | |
delay = 0.8 | |
}) | |
wait(1) | |
SoundHelper.playSoundAt(root.Portal.Part.CFrame, "portal_loop") | |
-- animate portal opening explosion | |
root.Portal.Part.Mesh.Scale = Vector3.new(0,0,0) | |
root.Portal.Part.Color = Color3.new(1,1,1) | |
local OPENING_DURRATION = 0.4 | |
local FADE_DURRATION = 2 | |
local scaleTweenInfo = TweenInfo.new(OPENING_DURRATION, Enum.EasingStyle.Quint, Enum.EasingDirection.In) | |
local colorTweenInfo = TweenInfo.new(FADE_DURRATION, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut,0,false,1) | |
ts:Create(root.Portal.Part.Mesh, scaleTweenInfo, {Scale = Vector3.new(1,1,1)}):Play() | |
ts:Create(root.Portal.Part, colorTweenInfo, {Color = Color3.new(0,0,0)}):Play() | |
wait(OPENING_DURRATION-0.1) | |
CollectionService:AddTag(telegroup, "teleporter_group") | |
SoundHelper.playSoundAt(root.Portal.Part.CFrame, "lightning") | |
root.Portal.emitters.FullPart.Big:Emit(10) | |
root.Portal.emitters.FullPart.Small:Emit(10) | |
root.Portal.emitters.FullPart.Fast:Emit(100) | |
root.Portal.emitters.HalfPart.VeryFast:Emit(20) | |
root.Portal.emitters.FullPart.Big.Enabled = true | |
root.Portal.emitters.FullPart.Small.Enabled = true | |
end | |
local function setupTeleportGroup() | |
for k,v in pairs(telegroup:GetChildren()) do | |
if v:IsA("BasePart") then | |
v.Transparency = 1 | |
end | |
end | |
end | |
return function(clientSession) | |
local store = clientSession.store | |
local api = clientSession.api | |
root.Trigger.Touched:Connect(function(hit) | |
if hitIsYou(hit) then | |
local hasAllKeys = ( | |
clientSession:getGameFlag("hasRedKey") and | |
clientSession:getGameFlag("hasGreenKey") and | |
clientSession:getGameFlag("hasBlueKey") | |
) or RunService:IsStudio() | |
if hasAllKeys then | |
openPortal() | |
end | |
end | |
end) | |
root.Trigger.Transparency = 1 | |
setupTeleportGroup() | |
end |
this is sad
rip...
this is very sad.
:(
not in april
…On Mon, Jun 1, 2020 at 9:31 AM helpforsupport ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
rip for the guy who committed suicide in april and then came back to edit
this script 2 hours ago and was active 15 mins ago.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/215a7595765f031bf380b68524650b09#gistcomment-3325709>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKKX7VCBJ7LNIQ4IHA6RHEDRUOUU5ANCNFSM4NPIMFWA>
.
rest in fucking peace man.
whenever you comment it says its been updated
Something fishy... this has been edited yesterday
rest well austin...
:(
Rest in peace Nimblz
We will remember you, Nimblz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
His last code.