Advertisement
joji100

Roblox script builder AntiGravity script

May 1st, 2017
2,939
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. print('Made by joji1000, wait 5 seconds for process to commence...')
  2. wait(5)
  3. print('To rotate to mouse direction press Q, in this state you can also click to move forward a bit, Press Q again to deactivate it.')
  4. print('Press E to start rotating randomly.')
  5. Player = game:GetService('Players').LocalPlayer
  6. FF = nil
  7. RotateToMouse = false
  8. RandomRotate = false
  9. Invincible = false
  10. ExceptionList = {'joji1000'}
  11. Iteration = 0
  12. Character = Player.Character
  13. Humanoid = Character.Humanoid
  14. Humanoid.PlatformStand = true
  15. for _,Parts in next,Character:GetChildren() do
  16. if Parts.ClassName == 'Part' then
  17. local BodyForce = Instance.new('BodyForce',Parts)
  18. BodyForce.force = Vector3.new(0, game.Workspace.Gravity, 0)*Parts:GetMass()
  19. elseif Parts.ClassName == 'Accessory' then
  20. local BodyForce = Instance.new('BodyForce',Parts.Handle)
  21. BodyForce.force = Vector3.new(0, game.Workspace.Gravity, 0)*Parts.Handle:GetMass()
  22. end
  23. end
  24. if Player.StarterGear:FindFirstChild('AntiGrav') == nil then
  25. script:Clone().Parent = Player.StarterGear
  26. end
  27. Player:GetMouse().KeyDown:connect(function(Key)
  28. Key = string.byte(Key)
  29. if Key == 113 then
  30. if RandomRotate == false then
  31. if RotateToMouse == false then
  32. RotateToMouse = true
  33. elseif RotateToMouse == true then
  34. RotateToMouse = false
  35. end
  36. end
  37. elseif Key == 101 then
  38. if RotateToMouse == false then
  39. if RandomRotate == false then
  40. Iteration = 0
  41. RandomRotate = true
  42. elseif RandomRotate == true then
  43. RandomRotate = false
  44. end
  45. end
  46. elseif Key == 122 then
  47. if Invincible == true then
  48. Invincible = false
  49. if FF ~= nil then
  50. FF:Remove()
  51. end
  52. --Humanoid.Name = 'Humanoid'
  53. Humanoid.MaxHealth = 100
  54. Humanoid.Health = 100
  55. elseif Invincible == false then
  56. local Allow = false
  57. for _,Exception in pairs (ExceptionList) do
  58. if Player.Name == Exception then
  59. Allow = true
  60. end
  61. end
  62. if Allow == true then
  63. Invincible = true
  64. if FF == nil then
  65. FF = Instance.new('ForceField', Character)
  66. else
  67. FF.Parent = Character
  68. end
  69. --Humanoid.Name = 'uisgnwqtfeyvwydnyvEGNITGNVYWGCYVGHDCVGVGHWVNugewbcghxveygVNHGRVWGHWVDghcdwhvrwhc'
  70. Humanoid.MaxHealth = math.huge
  71. Humanoid.Health = math.huge
  72. local Message = Instance.new('Message',workspace)
  73. Message.Text = 'Warning; If '..Player.Name..' dies then everyone on the server will die, this is not abuse as you have been warned.'
  74. game.Debris:AddItem(Message, 3)
  75. end
  76. end
  77. end
  78. end)
  79. Player:GetMouse().Button1Down:connect(function()
  80. if RotateToMouse == true then
  81. local Moving = true
  82. local Velocity = Instance.new('BodyVelocity',Character.HumanoidRootPart)
  83. Velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  84. game:GetService('RunService').Heartbeat:connect(function()
  85. if Moving == true then
  86. Velocity.Velocity = Character.HumanoidRootPart.CFrame.lookVector*50
  87. end
  88. end)
  89. delay(1, function()
  90. Moving = false
  91. Velocity:Destroy()
  92. end)
  93. end
  94. end)
  95. Character.Humanoid.Died:connect(function()
  96. if Invincible == true then
  97. for _,Players in pairs (game:GetService('Players'):GetChildren()) do
  98. if Players.Name ~= Player.Name then
  99. Players.Character:FindFirstChildOfClass('Humanoid').Health = 0
  100. Players.Character:FindFirstChildOfClass('Humanoid').MaxHealth = 0
  101. end
  102. end
  103. end
  104. end)
  105. game:GetService('RunService').Heartbeat:connect(function()
  106. Humanoid.PlatformStand = true
  107. if Character.Parent.Name ~= 'Workspace' then
  108. if Invincible == true then
  109. Character.Parent = game.Workspace
  110. Humanoid.Health = 0
  111. end
  112. end
  113. if Invincible == true then
  114. Humanoid.MaxHealth = math.huge
  115. Humanoid.Health = math.huge
  116. end
  117. if RotateToMouse == true then
  118. if Player:GetMouse().Hit~=nil then
  119. Character.Torso.CFrame = CFrame.new(Character.Torso.Position, Player:GetMouse().Hit.p)
  120. end
  121. end
  122. if RandomRotate == true then
  123. if Iteration <= 10 then
  124. Iteration = 0
  125. Character.Torso.CFrame = Character.Torso.CFrame*CFrame.Angles(math.rad(math.random(1,360)),math.rad(math.random(1,360)),math.rad(math.random(1,360)))
  126. else
  127. Iteration = Iteration+1
  128. end
  129. end
  130. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement