Advertisement
Jaden11

Untitled

Feb 17th, 2015
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. local Player=game.Players['GravityTeam']
  2. local Tablets=Instance.new("Model",workspace)
  3.  
  4. Part=Instance.new("Part",workspace)
  5. Part.Size=Vector3.new(2,2,2)
  6. Part.CanCollide=false;
  7. Part.BrickColor=BrickColor.new"Deep orange"
  8.  
  9. local sb=Instance.new("SelectionBox",prt)
  10. sb.Transparency=0.2;
  11. sb.Adornee=Part;
  12. sb.Color=BrickColor.new"Institutional white"
  13.  
  14. game:GetService("RunService").Heartbeat:connect(function()
  15. if Player then
  16. if Player.Character:FindFirstChild("Torso") then
  17. for i,v in pairs(Tablets:GetChildren()) do
  18. local WSP
  19. local radius = 6 + (0.5 / #Tablets:GetChildren())
  20. local x = math.cos((i / #Tablets:GetChildren() - (0.5 / #Tablets:GetChildren())) * math.pi * 2) * radius
  21. local y = 0.5;
  22. local z = math.sin((i / #Tablets:GetChildren() - (0.5 / #Tablets:GetChildren())) * math.pi * 2) * radius
  23. --pcall(function()
  24. local pos = Player.Character.Torso
  25. local WSP = CFrame.new(Player.Character.Torso.CFrame.X, Player.Character.Torso.CFrame.Y, Player.Character.Torso.CFrame.Z):toWorldSpace(CFrame.new(x,y,z):inverse())
  26. --end)
  27. local LerpedCF = v.CFrame.p:lerp(Vector3.new(WSP.X, WSP.Y, WSP.Z),0.2)
  28. local CF = CFrame.new(LerpedCF.X, LerpedCF.Y, LerpedCF.Z)
  29. v.CFrame = CFrame.new(CF.p, Player.Character.Torso.CFrame.p)
  30. end
  31. end
  32. end
  33. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement