Advertisement
KatieWhitson

Untitled

Jun 24th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.86 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5. local name = "Torso"
  6. if game.Players.LocalPlayer.Character:FindFirstChild("UpperTorso") then
  7. name = "UpperTorso"
  8. end
  9. if game.Players.LocalPlayer.Character:FindFirstChild("Torso") then
  10. name = "Torso"
  11. end
  12. local ch = game.Players.LocalPlayer.Character
  13. local prt=Instance.new("Model", workspace)
  14. local z1 = Instance.new("Part", prt)
  15. z1.Name="Torso"
  16. z1.CanCollide = false
  17. z1.Anchored = true
  18. local z2 =Instance.new("Part", prt)
  19. z2.Name="Head"
  20. z2.Anchored = true
  21. z2.CanCollide = false
  22. local z3 =Instance.new("Humanoid", prt)
  23. z3.Name="Humanoid"
  24. z1.Position = Vector3.new(0,9999,0)
  25. z2.Position = Vector3.new(0,9991,0)
  26. game.Players.LocalPlayer.Character=prt
  27. wait(5)
  28. game.Players.LocalPlayer.Character=ch
  29. wait(6)
  30.  
  31.  
  32. --game:GetService('RunService').Stepped:connect(function()
  33. --game.Players.LocalPlayer.Character.Head.CanCollide = false
  34. --end)
  35.  
  36. local humano = game.Players.LocalPlayer.Character.Humanoid:Clone()
  37.  
  38.  
  39.  
  40. wait()
  41.  
  42. game.Players.LocalPlayer.Character[name]:Destroy()
  43. game.Players.LocalPlayer.Character.HumanoidRootPart:Destroy()
  44.  
  45.  
  46. game.Players.LocalPlayer.Character["Left Arm"].Anchored = true
  47. game.Players.LocalPlayer.Character["Right Arm"].Anchored = true
  48. game.Players.LocalPlayer.Character["Left Leg"].Anchored = true
  49. game.Players.LocalPlayer.Character["Right Leg"].Anchored = true
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. local torso = game.Players.LocalPlayer.Character.Head
  70. game.Players.LocalPlayer.Character.Humanoid.Parent = game.Lighting
  71.  
  72. game:GetService("RunService").Stepped:connect(function()
  73.  
  74. torso.CanCollide = false
  75.  
  76. end)
  77.  
  78. humano.Parent = game.Players.LocalPlayer.Character
  79.  
  80. local humanoid = humano--Instance.new("Humanoid",game.Players.LocalPlayer.Character)
  81.  
  82.  
  83.  
  84.  
  85.  
  86. humanoid.HipHeight = 2
  87.  
  88.  
  89. humanoid.WalkSpeed = 50
  90.  
  91. --fley
  92.  
  93.  
  94. local mouse = game.Players.LocalPlayer:GetMouse()
  95.  
  96.  
  97.  
  98. local target = torso
  99. local camera = workspace.CurrentCamera
  100. camera.CameraType = Enum.CameraType.Follow
  101. camera.CameraSubject = target
  102.  
  103.  
  104.  
  105.  
  106.  
  107. local plr = game.Players.LocalPlayer
  108. local flying = true
  109. local deb = true
  110. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  111. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  112. local maxspeed = 4000
  113. local speed = 0
  114.  
  115. function Fly()
  116. local bg = Instance.new("BodyGyro", torso)
  117. bg.P = 9e4
  118. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  119. bg.cframe = torso.CFrame
  120. local bv = Instance.new("BodyVelocity", torso)
  121. bv.velocity = Vector3.new(0,0,0)
  122. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  123. repeat wait()
  124.  
  125. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  126. speed = speed+.5+(speed/maxspeed)
  127. if speed > maxspeed then
  128. speed = maxspeed
  129. end
  130. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  131. speed = speed-1
  132. if speed < 0 then
  133. speed = 0
  134. end
  135. end
  136. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  137. 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
  138. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  139. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  140. 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
  141. else
  142. bv.velocity = Vector3.new(0,0.1,0)
  143. end
  144. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  145. until not flying
  146. ctrl = {f = 0, b = 0, l = 0, r = 0}
  147. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  148. speed = 0
  149. bg:Destroy()
  150. bv:Destroy()
  151.  
  152. end
  153. mouse.KeyDown:connect(function(key)
  154. if key:lower() == "e" then
  155. if flying then flying = false
  156. else
  157. flying = true
  158. Fly()
  159. end
  160. elseif key:lower() == "w" then
  161. ctrl.f = 1
  162. elseif key:lower() == "s" then
  163. ctrl.b = -1
  164. elseif key:lower() == "a" then
  165. ctrl.l = -1
  166. elseif key:lower() == "d" then
  167. ctrl.r = 1
  168. end
  169. end)
  170. mouse.KeyUp:connect(function(key)
  171. if key:lower() == "w" then
  172. ctrl.f = 0
  173. elseif key:lower() == "s" then
  174. ctrl.b = 0
  175. elseif key:lower() == "a" then
  176. ctrl.l = 0
  177. elseif key:lower() == "d" then
  178. ctrl.r = 0
  179. end
  180. end)
  181. Fly()
  182.  
  183.  
  184.  
  185.  
  186.  
  187. torso.Name = "HumanoidRootPart"
  188.  
  189.  
  190.  
  191.  
  192.  
  193. mouse.KeyDown:connect(function(k)
  194.  
  195. if k:lower() == "z"then
  196.  
  197. print("oof")
  198.  
  199. torso.Velocity = Vector3.new(0,1919191,0)
  200.  
  201. end
  202.  
  203.  
  204.  
  205.  
  206. end)
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215. local mouse = game.Players.LocalPlayer:GetMouse()
  216.  
  217.  
  218.  
  219.  
  220. mouse.KeyDown:connect(function(k)
  221. local key = k:lower()
  222. if key == "z"then
  223.  
  224. print("ga")
  225. local torso = mouse.Target
  226.  
  227. --fly------------------------------------------------
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244. -- cam manipulation
  245.  
  246. local target = mouse.Target
  247. local camera = workspace.CurrentCamera
  248. camera.CameraType = Enum.CameraType.Follow
  249. camera.CameraSubject = target
  250.  
  251.  
  252.  
  253.  
  254. --cam manipulation2
  255.  
  256. game:GetService('RunService').Stepped:connect(function()
  257. torso.CanCollide = false
  258. end)
  259.  
  260.  
  261.  
  262.  
  263. local powers = 99
  264.  
  265.  
  266. local bambam = Instance.new("BodyThrust")
  267. bambam.Parent = torso
  268. bambam.Force = Vector3.new(powers,0,powers)
  269. bambam.Location = torso.Position-Vector3.new(0,0,50)
  270.  
  271.  
  272.  
  273.  
  274. local plr = game.Players.LocalPlayer
  275. local torso = mouse.Target
  276. local flying = true
  277. local deb = true
  278. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  279. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  280. local maxspeed = 4000
  281. local speed = 0
  282.  
  283. function Fly()
  284.  
  285. local bv = Instance.new("BodyVelocity", torso)
  286. bv.velocity = Vector3.new(0,0,0)
  287. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  288. repeat wait()
  289.  
  290. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  291. speed = speed+.5+(speed/maxspeed)
  292. if speed > maxspeed then
  293. speed = maxspeed
  294. end
  295. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  296. speed = speed-1
  297. if speed < 0 then
  298. speed = 0
  299. end
  300. end
  301. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  302. 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
  303. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  304. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  305. 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
  306. else
  307. bv.velocity = Vector3.new(0,0.1,0)
  308. end
  309.  
  310. until not flying
  311. ctrl = {f = 0, b = 0, l = 0, r = 0}
  312. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  313. speed = 0
  314.  
  315. bv:Destroy()
  316.  
  317. end
  318. mouse.KeyDown:connect(function(key)
  319. if key:lower() == "e" then
  320. if flying then flying = false
  321. else
  322. flying = true
  323. Fly()
  324. end
  325. elseif key:lower() == "w" then
  326. ctrl.f = 1
  327. elseif key:lower() == "s" then
  328. ctrl.b = -1
  329. elseif key:lower() == "a" then
  330. ctrl.l = -1
  331. elseif key:lower() == "d" then
  332. ctrl.r = 1
  333. end
  334. end)
  335. mouse.KeyUp:connect(function(key)
  336. if key:lower() == "w" then
  337. ctrl.f = 0
  338. elseif key:lower() == "s" then
  339. ctrl.b = 0
  340. elseif key:lower() == "a" then
  341. ctrl.l = 0
  342. elseif key:lower() == "d" then
  343. ctrl.r = 0
  344. end
  345. end)
  346. Fly()
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353. --fly
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361. end
  362.  
  363. local hum = game.Players.LocalPlayer.Character.HumanoidRootPart
  364.  
  365. if key == "x" then
  366.  
  367. if mouse.Target then
  368.  
  369. hum.CFrame = CFrame.new(mouse.Hit.x, mouse.Hit.y + 5, mouse.Hit.z)
  370.  
  371. end
  372. end
  373.  
  374. if key == "q" then
  375. local target = game.Players.LocalPlayer.Character.Head
  376. local camera = workspace.CurrentCamera
  377. camera.CameraType = Enum.CameraType.Follow
  378. camera.CameraSubject = target
  379.  
  380. end
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement