Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. --//Main remote event\\--
  2. script.Events:WaitForChild("Invisible").onServerEvent:connect(function(Player)
  3.  
  4. --//Variables\\--
  5. local Whistle_Animation = Player.Character.Humanoid:LoadAnimation(script.Animations.Whistle)
  6. local Whistle_Sound = script.Sounds.Whistle
  7. local Charge_Sound = script.Sounds.Charge
  8. local E_Sound = script.Sounds.Electricity
  9.  
  10. --//Play animations\\--
  11. Whistle_Animation:Play()
  12. Whistle_Sound:Play()
  13.  
  14. --//Delays and sound playing matching the animations\\--
  15. wait(5)
  16. Charge_Sound:Play()
  17. wait(.5)
  18. E_Sound:Play()
  19. wait(2)
  20.  
  21. --//Turn player completely invisible\\--
  22. Player.Character.Head.face.Transparency = 1
  23. for i,v in pairs(Player.Character:GetChildren()) do
  24. if v:IsA("Part") or v:IsA("MeshPart") then
  25. v.Transparency = 1
  26. end
  27. if v:IsA("Accessory") then
  28. v.Handle.Transparency = 1
  29. end
  30. end
  31.  
  32. --//Delay 15 seconds\\--
  33. wait(15)
  34.  
  35. --//Turn player visible again\\--
  36. Player.Character.Head.face.Transparency = 0
  37. for i,v in pairs(Player.Character:GetChildren()) do
  38. if v:IsA("Part") or v:IsA("MeshPart") then
  39. if tostring(v) ~= "HumanoidRootPart" then --Make sure the HumanoidRootPart stays invisible
  40. v.Transparency = 0
  41. end
  42. end
  43. if v:IsA("Accessory") then
  44. v.Handle.Transparency = 0
  45. end
  46. end
  47.  
  48. --//End of the script\\--
  49. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement