Advertisement
ssssdsd1213

Untitled

Dec 3rd, 2022 (edited)
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.85 KB | None | 0 0
  1.  
  2. local main = Instance.new("ScreenGui")
  3. local Frame = Instance.new("Frame")
  4. local up = Instance.new("TextButton")
  5. local down = Instance.new("TextButton")
  6. local onof = Instance.new("TextButton")
  7. local TextLabel = Instance.new("TextLabel")
  8. local plus = Instance.new("TextButton")
  9. local speed = Instance.new("TextLabel")
  10. local mine = Instance.new("TextButton")
  11.  
  12. --Properties:
  13.  
  14. main.Name = "main"
  15. main.Parent = game.CoreGui
  16. main.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  17.  
  18. Frame.Parent = main
  19. Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  20. Frame.Position = UDim2.new(0.100320168, 0, 0.379746825, 0)
  21. Frame.Size = UDim2.new(0, 190, 0, 57)
  22. Frame.BackgroundTransparency = 1.000
  23.  
  24. --ẩn
  25. up.Visible = false
  26. down.Visible = false
  27.  
  28. up.Name = "up"
  29. up.Parent = Frame
  30. up.BackgroundColor3 = Color3.fromRGB(250, 250, 250)
  31. up.Size = UDim2.new(0, 44, 0, 28)
  32. up.Font = Enum.Font.SourceSans
  33. up.Text = "up"
  34. up.TextColor3 = Color3.fromRGB(0, 0, 0)
  35. up.TextSize = 14.000
  36.  
  37. down.Name = "down"
  38. down.Parent = Frame
  39. down.BackgroundColor3 = Color3.fromRGB(250, 250, 250)
  40. down.Position = UDim2.new(0, 0, 0.491228074, 0)
  41. down.Size = UDim2.new(0, 44, 0, 28)
  42. down.Font = Enum.Font.SourceSans
  43. down.Text = "DOWN"
  44. down.TextColor3 = Color3.fromRGB(0, 0, 0)
  45. down.TextSize = 14.000
  46.  
  47. onof.Name = "onof"
  48. onof.Parent = Frame
  49. onof.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  50. onof.Position = UDim2.new(0.702823281, 0, 0.491228074, 0)
  51. onof.Size = UDim2.new(0, 56, 0, 28)
  52. onof.Font = Enum.Font.SourceSans
  53. onof.Text = "Fly"
  54. onof.TextColor3 = Color3.fromRGB(250, 250, 250)
  55. onof.TextSize = 16.000
  56.  
  57. TextLabel.Parent = Frame
  58. TextLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  59. TextLabel.Position = UDim2.new(0.469327301, 0, 0, 0)
  60. TextLabel.Size = UDim2.new(0, 100, 0, 28)
  61. TextLabel.Font = Enum.Font.SourceSans
  62. TextLabel.Text = "Nguyễn An"
  63. TextLabel.TextColor3 = Color3.fromRGB(250, 250, 250)
  64. TextLabel.TextScaled = true
  65. TextLabel.TextSize = 14.000
  66. TextLabel.TextWrapped = true
  67.  
  68. plus.Name = "plus"
  69. plus.Parent = Frame
  70. plus.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  71. plus.Position = UDim2.new(0.231578946, 0, 0, 0)
  72. plus.Size = UDim2.new(0, 45, 0, 28)
  73. plus.Font = Enum.Font.SourceSans
  74. plus.Text = "+"
  75. plus.TextColor3 = Color3.fromRGB(250, 250, 250)
  76. plus.TextScaled = true
  77. plus.TextSize = 14.000
  78. plus.TextWrapped = true
  79.  
  80. speed.Name = "speed"
  81. speed.Parent = Frame
  82. speed.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  83. speed.Position = UDim2.new(0.468421042, 0, 0.491228074, 0)
  84. speed.Size = UDim2.new(0, 44, 0, 28)
  85. speed.Font = Enum.Font.SourceSans
  86. speed.Text = "1"
  87. speed.TextColor3 = Color3.fromRGB(250, 250, 250)
  88. speed.TextScaled = true
  89. speed.TextSize = 14.000
  90. speed.TextWrapped = true
  91.  
  92. mine.Name = "mine"
  93. mine.Parent = Frame
  94. mine.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  95. mine.Position = UDim2.new(0.231578946, 0, 0.491228074, 0)
  96. mine.Size = UDim2.new(0, 45, 0, 29)
  97. mine.Font = Enum.Font.SourceSans
  98. mine.Text = "-"
  99. mine.TextColor3 = Color3.fromRGB(250, 250, 250)
  100. mine.TextScaled = true
  101. mine.TextSize = 14.000
  102. mine.TextWrapped = true
  103.  
  104. speeds = 1
  105.  
  106. local speaker = game:GetService("Players").LocalPlayer
  107.  
  108. local chr = game.Players.LocalPlayer.Character
  109. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  110.  
  111. nowe = false
  112.  
  113. Frame.Active = true -- main = gui
  114. Frame.Draggable = true
  115.  
  116. onof.MouseButton1Down:connect(function()
  117.  
  118. if nowe == true then
  119. nowe = false
  120.  
  121. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,true)
  122. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
  123. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,true)
  124. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,true)
  125. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
  126. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,true)
  127. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,true)
  128. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,true)
  129. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,true)
  130. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
  131. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,true)
  132. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,true)
  133. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,true)
  134. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,true)
  135. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,true)
  136. speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
  137. else
  138. nowe = true
  139.  
  140.  
  141.  
  142. for i = 1, speeds do
  143. spawn(function()
  144.  
  145. local hb = game:GetService("RunService").Heartbeat
  146.  
  147.  
  148. tpwalking = true
  149. local chr = game.Players.LocalPlayer.Character
  150. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  151. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  152. if hum.MoveDirection.Magnitude > 0 then
  153. chr:TranslateBy(hum.MoveDirection)
  154. end
  155. end
  156.  
  157. end)
  158. end
  159. game.Players.LocalPlayer.Character.Animate.Disabled = true
  160. local Char = game.Players.LocalPlayer.Character
  161. local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController")
  162.  
  163. for i,v in next, Hum:GetPlayingAnimationTracks() do
  164. v:AdjustSpeed(0)
  165. end
  166. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,false)
  167. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
  168. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,false)
  169. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
  170. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
  171. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)
  172. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,false)
  173. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
  174. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,false)
  175. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
  176. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)
  177. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,false)
  178. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,false)
  179. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,false)
  180. speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,false)
  181. speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
  182. end
  183.  
  184.  
  185.  
  186.  
  187.  
  188. local plr = game.Players.LocalPlayer
  189. local UpperTorso = plr.Character.LowerTorso
  190. local flying = true
  191. local deb = true
  192. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  193. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  194. local maxspeed = 50
  195. local speed = 0
  196.  
  197.  
  198. local bg = Instance.new("BodyGyro", UpperTorso)
  199. bg.P = 9e4
  200. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  201. bg.cframe = UpperTorso.CFrame
  202. local bv = Instance.new("BodyVelocity", UpperTorso)
  203. bv.velocity = Vector3.new(0,0.1,0)
  204. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  205. if nowe == true then
  206. plr.Character.Humanoid.PlatformStand = true
  207. end
  208. while nowe == true or game:GetService("Players").LocalPlayer.Character.Humanoid.Health == 0 do
  209. wait()
  210.  
  211. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  212. speed = speed+.5+(speed/maxspeed)
  213. if speed > maxspeed then
  214. speed = maxspeed
  215. end
  216. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  217. speed = speed-1
  218. if speed < 0 then
  219. speed = 0
  220. end
  221. end
  222. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  223. 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
  224. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  225. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  226. 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
  227. else
  228. bv.velocity = Vector3.new(0,0,0)
  229. end
  230.  
  231. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  232. end
  233. ctrl = {f = 0, b = 0, l = 0, r = 0}
  234. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  235. speed = 0
  236. bg:Destroy()
  237. bv:Destroy()
  238. plr.Character.Humanoid.PlatformStand = false
  239. game.Players.LocalPlayer.Character.Animate.Disabled = false
  240. tpwalking = false
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250. end)
  251.  
  252.  
  253. up.MouseButton1Down:connect(function()
  254. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,2,0)
  255.  
  256. end)
  257.  
  258.  
  259. down.MouseButton1Down:connect(function()
  260.  
  261. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,-2,0)
  262.  
  263. end)
  264.  
  265.  
  266. game:GetService("Players").LocalPlayer.CharacterAdded:Connect(function(char)
  267. wait(0.7)
  268. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  269. game.Players.LocalPlayer.Character.Animate.Disabled = false
  270.  
  271. end)
  272.  
  273.  
  274. plus.MouseButton1Down:connect(function()
  275. speeds = speeds + 1
  276. speed.Text = speeds
  277. if nowe == true then
  278.  
  279.  
  280. tpwalking = false
  281. for i = 1, speeds do
  282. spawn(function()
  283.  
  284. local hb = game:GetService("RunService").Heartbeat
  285.  
  286.  
  287. tpwalking = true
  288. local chr = game.Players.LocalPlayer.Character
  289. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  290. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  291. if hum.MoveDirection.Magnitude > 0 then
  292. chr:TranslateBy(hum.MoveDirection)
  293. end
  294. end
  295.  
  296. end)
  297. end
  298. end
  299. end)
  300. mine.MouseButton1Down:connect(function()
  301. if speeds == 1 then
  302. speed.Text = 'can not be less than 1'
  303. wait(1)
  304. speed.Text = speeds
  305. else
  306. speeds = speeds - 1
  307. speed.Text = speeds
  308. if nowe == true then
  309. tpwalking = false
  310. for i = 1, speeds do
  311. spawn(function()
  312.  
  313. local hb = game:GetService("RunService").Heartbeat
  314.  
  315.  
  316. tpwalking = true
  317. local chr = game.Players.LocalPlayer.Character
  318. local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
  319. while tpwalking and hb:Wait() and chr and hum and hum.Parent do
  320. if hum.MoveDirection.Magnitude > 0 then
  321. chr:TranslateBy(hum.MoveDirection)
  322. end
  323. end
  324.  
  325. end)
  326. end
  327. end
  328. end
  329. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement