Advertisement
RammyXO

Untitled

Oct 14th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. local name = "Torso"
  2. if game.Players.LocalPlayer.Character:FindFirstChild("UpperTorso") then
  3. name = "UpperTorso"
  4. end
  5. if game.Players.LocalPlayer.Character:FindFirstChild("Torso") then
  6. name = "Torso"
  7. end
  8. local ch = game.Players.LocalPlayer.Character
  9. local prt=Instance.new("Model", workspace)
  10. local z1 = Instance.new("Part", prt)
  11. z1.Name="Torso"
  12. z1.CanCollide = false
  13. z1.Anchored = true
  14. local z2 =Instance.new("Part", prt)
  15. z2.Name="Head"
  16. z2.Anchored = true
  17. z2.CanCollide = false
  18. local z3 =Instance.new("Humanoid", prt)
  19. z3.Name="Humanoid"
  20. z1.Position = Vector3.new(0,9999,0)
  21. z2.Position = Vector3.new(0,9991,0)
  22. game.Players.LocalPlayer.Character=prt
  23. wait(5)
  24. game.Players.LocalPlayer.Character=ch
  25. wait(6)
  26.  
  27.  
  28. --game:GetService('RunService').Stepped:connect(function()
  29. --game.Players.LocalPlayer.Character.Head.CanCollide = false
  30. --end)
  31.  
  32. local humano = game.Players.LocalPlayer.Character.Humanoid:Clone()
  33.  
  34.  
  35.  
  36. wait()
  37.  
  38. game.Players.LocalPlayer.Character[name]:Destroy()
  39. game.Players.LocalPlayer.Character.HumanoidRootPart:Destroy()
  40.  
  41.  
  42. game.Players.LocalPlayer.Character["Left Arm"].Anchored = true
  43. game.Players.LocalPlayer.Character["Right Arm"].Anchored = true
  44. game.Players.LocalPlayer.Character["Left Leg"].Anchored = true
  45. game.Players.LocalPlayer.Character["Right Leg"].Anchored = true
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. local bambam = Instance.new("BodyThrust")
  65. bambam.Parent = game.Players.LocalPlayer.Character.Head
  66. bambam.Force = Vector3.new(0,9999999,0)
  67. bambam.Location = game.Players.LocalPlayer.Character.Head.Position
  68. local torso = game.Players.LocalPlayer.Character.Head
  69. game.Players.LocalPlayer.Character.Humanoid.Parent = game.Lighting
  70.  
  71. game:GetService("RunService").Stepped:connect(function()
  72.  
  73. torso.CanCollide = false
  74.  
  75. end)
  76.  
  77. humano.Parent = game.Players.LocalPlayer.Character
  78.  
  79. local humanoid = humano--Instance.new("Humanoid",game.Players.LocalPlayer.Character)
  80.  
  81.  
  82.  
  83.  
  84.  
  85. humanoid.HipHeight = 2
  86.  
  87.  
  88. humanoid.WalkSpeed = 50
  89.  
  90. --fley
  91.  
  92.  
  93. local mouse = game.Players.LocalPlayer:GetMouse()
  94.  
  95.  
  96.  
  97. local target = torso
  98. local camera = workspace.CurrentCamera
  99. camera.CameraType = Enum.CameraType.Follow
  100. camera.CameraSubject = target
  101.  
  102.  
  103.  
  104.  
  105.  
  106. local plr = game.Players.LocalPlayer
  107. local flying = true
  108. local deb = true
  109. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  110. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  111. local maxspeed = 4000
  112. local speed = 0
  113.  
  114. function Fly()
  115. local bg = Instance.new("BodyGyro", torso)
  116. bg.P = 9e4
  117. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  118. bg.cframe = torso.CFrame
  119. local bv = Instance.new("BodyVelocity", torso)
  120. bv.velocity = Vector3.new(0,0,0)
  121. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  122. repeat wait()
  123.  
  124. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  125. speed = speed+.5+(speed/maxspeed)
  126. if speed > maxspeed then
  127. speed = maxspeed
  128. end
  129. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  130. speed = speed-1
  131. if speed < 0 then
  132. speed = 0
  133. end
  134. end
  135. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  136. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  137. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  138. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  139. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  140. else
  141. bv.velocity = Vector3.new(0,0.1,0)
  142. end
  143. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  144. until not flying
  145. ctrl = {f = 0, b = 0, l = 0, r = 0}
  146. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  147. speed = 0
  148. bg:Destroy()
  149. bv:Destroy()
  150.  
  151. end
  152. mouse.KeyDown:connect(function(key)
  153. if key:lower() == "e" then
  154. if flying then flying = false
  155. else
  156. flying = true
  157. Fly()
  158. end
  159. elseif key:lower() == "w" then
  160. ctrl.f = 1
  161. elseif key:lower() == "s" then
  162. ctrl.b = -1
  163. elseif key:lower() == "a" then
  164. ctrl.l = -1
  165. elseif key:lower() == "d" then
  166. ctrl.r = 1
  167. end
  168. end)
  169. mouse.KeyUp:connect(function(key)
  170. if key:lower() == "w" then
  171. ctrl.f = 0
  172. elseif key:lower() == "s" then
  173. ctrl.b = 0
  174. elseif key:lower() == "a" then
  175. ctrl.l = 0
  176. elseif key:lower() == "d" then
  177. ctrl.r = 0
  178. end
  179. end)
  180. Fly()
  181.  
  182.  
  183.  
  184.  
  185.  
  186. torso.Name = "HumanoidRootPart"
  187.  
  188.  
  189.  
  190.  
  191.  
  192. mouse.KeyDown:connect(function(k)
  193.  
  194. if k:lower() == "z"then
  195.  
  196. print("oof")
  197.  
  198. torso.Velocity = Vector3.new(0,1919191,0)
  199.  
  200. end
  201.  
  202.  
  203.  
  204.  
  205. end)
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement