Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local PPS = game:GetService("ProximityPromptService")
- local position = workspace.jellybeanPortrait.Position
- PPS.PromptTriggered:Connect(function(plr) --triggers function
- workspace.jellybeanPortrait:Destroy()
- local explosion1 = Instance.new("Explosion", workspace)
- explosion1.Position = position
- local sound = game.ServerStorage["Rocket Launcher Fire"]:Clone()
- sound.Parent = workspace.SoundPart
- sound:Play()
- workspace.TextPart.SurfaceGui.TextLabel.Text = "THE ENEMY HAS BEEN DEFEATED"
- local allPartsComputer = workspace.ComputerMAIN:GetChildren()
- local allPartsPictureFrame = workspace["Picture Frame"]:GetChildren()
- if allPartsComputer and allPartsPictureFrame ~= nil then
- for i, v in pairs(allPartsComputer) do
- v.Anchored = false
- v.Velocity = Vector3.new(0, 28, 50)
- if v.Name == "Screen" then
- v.Anchored = false
- v.Velocity = Vector3.new(0, 28, 50)
- v.Decal:Destroy()
- end
- end
- for i, v in pairs(allPartsPictureFrame) do
- v.Anchored = false
- v.Velocity = Vector3.new(35, 28, 0)
- end
- end
- game.ReplicatedStorage.KillEvent:FireAllClients()
- game.ReplicatedStorage.ShakeEvent:FireAllClients(0.686)
- task.wait(2)
- for i, v in pairs(allPartsComputer) do
- repeat
- task.wait(0.03)
- v.Transparency = v.Transparency + 0.05
- until v.Transparency >= 1
- v:Destroy()
- end
- for i, v in pairs(allPartsPictureFrame) do
- repeat
- task.wait(0.03)
- v.Transparency = v.Transparency + 0.05
- until v.Transparency >= 1
- v:Destroy()
- end
- script.Parent:Destroy() --destroys proximity prompt
- script:Disconnect()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement