Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local Character = "rehan3767"
  2. local lev = 236 / 1.2
  3. local grav = .7
  4.  
  5. function dataGetMass(number)
  6. local totalMass = 0
  7. local p = workspace[Character]:GetChildren()
  8.  
  9. for i = 1, #p do
  10.  
  11. if p[i]:IsA("Part") == true then
  12. totalMass = totalMass + p[i]:GetMass()
  13.  
  14. elseif p[i]:IsA("Hat") == true then
  15. totalMass = totalMass + p[i].Handle:GetMass()
  16.  
  17. end
  18. end
  19.  
  20. return totalMass
  21.  
  22. end
  23.  
  24. local bf = Instance.new("BodyForce")
  25. bf.Parent = game.Workspace[Character]Head
  26. bf.force = Vector3.new(0, dataGetMass(number) * lev * grav, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement