Advertisement
SxScripting

SpiritPressure[Local Script]

Aug 26th, 2021
865
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. local Lighting = game:GetService("Lighting")
  2. local UIS = game:GetService("UserInputService")
  3. local TS = game:GetService("TweenService")
  4. local RS = game:GetService("ReplicatedStorage")
  5.  
  6. local Player = game.Players.LocalPlayer
  7.  
  8. UIS.InputBegan:Connect(function(Input,IsTyping)
  9. if IsTyping then return end
  10. if Input.KeyCode == Enum.KeyCode.E then
  11. game.ReplicatedStorage.Events.Pressure:FireServer()
  12. end
  13. end)
  14.  
  15. RS.Events.Pressure.OnClientEvent:Connect(function(Duration, OtherPlayer)
  16. local Humanoid = Player.Character:WaitForChild("Humanoid")
  17. local ScaleAmount = 4
  18. local v1 = {
  19. OtherPlayer.Character.Humanoid:WaitForChild("HeadScale");
  20. OtherPlayer.Character.Humanoid:WaitForChild("BodyDepthScale");
  21. OtherPlayer.Character.Humanoid:WaitForChild("BodyWidthScale");
  22. OtherPlayer.Character.Humanoid:WaitForChild("BodyHeightScale")
  23. }
  24. game.Lighting.Brightness = 0
  25. local Effect = {
  26. game.ReplicatedStorage.Effects["Grey Null Sky"]:Clone();
  27. game.ReplicatedStorage.Effects.SpiritBlur:Clone();
  28. }
  29. for _, Eff in ipairs(Effect) do
  30. Eff.Parent = game.Lighting
  31. end
  32.  
  33. for i,v in pairs(v1) do
  34. local QuickTween = TS:Create(v,TweenInfo.new(Duration), {Value = v.Value * ScaleAmount})
  35. QuickTween:Play()
  36. QuickTween.Completed:Connect(function()
  37. v.Value = 1
  38. end)
  39. end
  40.  
  41. local StartTime = os.clock()
  42. while (StartTime - os.clock()) >= -Duration do
  43. local x = math.random(-100,100)/100
  44. local y = math.random(-100,100)/100
  45. local z = math.random(-100,100)/100
  46. Humanoid.CameraOffset = Vector3.new(x,y,z)
  47. wait()
  48. end
  49. Humanoid.CameraOffset = Vector3.new(0,0,0)
  50. for Index,Value in pairs(Effect) do
  51. Value:Destroy()
  52. Effect[Index] = nil
  53. end
  54.  
  55. game.Lighting.Brightness = 1
  56. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement