Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//Main remote event\\--
- script.Events:WaitForChild("Invisible").onServerEvent:connect(function(Player)
- --//Variables\\--
- local Whistle_Animation = Player.Character.Humanoid:LoadAnimation(script.Animations.Whistle)
- local Whistle_Sound = script.Sounds.Whistle
- local Charge_Sound = script.Sounds.Charge
- local E_Sound = script.Sounds.Electricity
- --//Play animations\\--
- Whistle_Animation:Play()
- Whistle_Sound:Play()
- --//Delays and sound playing matching the animations\\--
- wait(5)
- Charge_Sound:Play()
- wait(.5)
- E_Sound:Play()
- wait(2)
- --//Turn player completely invisible\\--
- Player.Character.Head.face.Transparency = 1
- for i,v in pairs(Player.Character:GetChildren()) do
- if v:IsA("Part") or v:IsA("MeshPart") then
- v.Transparency = 1
- end
- if v:IsA("Accessory") then
- v.Handle.Transparency = 1
- end
- end
- --//Delay 15 seconds\\--
- wait(15)
- --//Turn player visible again\\--
- Player.Character.Head.face.Transparency = 0
- for i,v in pairs(Player.Character:GetChildren()) do
- if v:IsA("Part") or v:IsA("MeshPart") then
- if tostring(v) ~= "HumanoidRootPart" then --Make sure the HumanoidRootPart stays invisible
- v.Transparency = 0
- end
- end
- if v:IsA("Accessory") then
- v.Handle.Transparency = 0
- end
- end
- --//End of the script\\--
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement