Advertisement
SxScripting

Flash Step Server Script

Jul 28th, 2022
3,043
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. local RS = game:GetService("ReplicatedStorage")
  2. local Speed = 120
  3. local Duration = .3
  4. local Cooldown = 2
  5. local Debounce = {}
  6.  
  7. RS.Step.OnServerEvent:Connect(function(Player)
  8. if Debounce[Player] then return end
  9. Debounce[Player] = true
  10.  
  11. local Delete = {}
  12. local Transparency = {}
  13.  
  14. local Character = Player.Character
  15. local Attachment = Instance.new("Attachment", Character.HumanoidRootPart)
  16. local LinearVelocity = Instance.new("LinearVelocity", Character.HumanoidRootPart)
  17.  
  18. Delete[#Delete + 1] = Attachment
  19. Delete[#Delete + 1] = LinearVelocity
  20.  
  21. LinearVelocity.MaxForce = 300000
  22. LinearVelocity.Attachment0 = Attachment
  23. LinearVelocity.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
  24. LinearVelocity.LineDirection = Vector3.new(Character.HumanoidRootPart.CFrame.LookVector.X, 0, Character.HumanoidRootPart.CFrame.LookVector.Z)
  25. LinearVelocity.LineVelocity = Speed
  26.  
  27.  
  28. local Particle = RS.ParticleFlash
  29. local ClonedParticle = Particle:Clone()
  30. ClonedParticle.Parent = Character.HumanoidRootPart
  31. Delete[#Delete + 1] = ClonedParticle
  32.  
  33. for Index,Value in pairs(Character:GetDescendants()) do
  34. if not Value:IsA("BasePart") then continue end
  35. Transparency[Value] = Value.Transparency
  36. Value.Transparency = 1
  37. end
  38.  
  39. wait(Duration)
  40.  
  41. for i,v in pairs(Transparency) do
  42. i.Transparency = v
  43. end
  44. for i,v in pairs(Delete) do
  45. v:Destroy()
  46. Delete[i] = nil
  47. end
  48.  
  49. wait(Cooldown)
  50. Debounce[Player] = nil
  51. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement