Advertisement
eea

headshot

eea
Jul 8th, 2022 (edited)
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. local start = Vector3.new(-5, 10, -5)
  2. local duration = 2
  3. local waittime = 5
  4. while task.wait(waittime) do
  5.  local s = os.clock()
  6.  local p = Instance.new("Part", script)
  7.  p.Size = Vector3.new(1, 1, 1)
  8.  p.Shape = "Ball"
  9.  p.Position = start
  10.  local head = owner.Character.Head
  11.  local f = head.Position
  12.  local dv =  f-start
  13.  local g = workspace.Gravity
  14.  local d = os.clock() - s
  15.  local vel = ((f + head.Velocity*(duration+d)-start)/duration + Vector3.new(0, g/2 * duration, 0))*p.Mass
  16.  p:ApplyImpulse(vel)
  17.  local at1 = Instance.new("Attachment", p)
  18.  at1.Position = Vector3.new(.5, 0, .5)
  19.  local at2 = Instance.new("Attachment", p)
  20.  at2.Position = Vector3.new(-.5, 0, .5)
  21.  local trail = Instance.new("Trail", p)
  22.  trail.Attachment0 = at1
  23.  trail.Attachment1 = at2
  24.  trail.Lifetime = duration+.2
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement