Advertisement
xcodeerror

LumberTycoon2GUI

Jul 5th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.29 KB | None | 0 0
  1. -- Objects
  2.  
  3. local LumberTycoon = Instance.new("ScreenGui")
  4. local Main = Instance.new("Frame")
  5. local ReText = Instance.new("TextLabel")
  6. local Speed = Instance.new("TextButton")
  7. local FlyE = Instance.new("TextButton")
  8. local Gravity = Instance.new("TextButton")
  9. local TextButton = Instance.new("TextButton")
  10. local TextButton_2 = Instance.new("TextButton")
  11. local TextButton_3 = Instance.new("TextButton")
  12. local ReText_2 = Instance.new("TextLabel")
  13.  
  14. -- Properties
  15.  
  16. LumberTycoon.Name = "LumberTycoon"
  17. LumberTycoon.Parent = game.CoreGui
  18. LumberTycoon.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  19.  
  20. Main.Name = "Main"
  21. Main.Parent = LumberTycoon
  22. Main.BackgroundColor3 = Color3.new(0, 0, 0)
  23. Main.BorderColor3 = Color3.new(0, 0, 0)
  24. Main.Position = UDim2.new(0.728538275, 0, 0.0776892453, 0)
  25. Main.Size = UDim2.new(0, 216, 0, 239)
  26. Main.Active = true
  27. Main.Visible = true
  28. Main.Draggble = true
  29.  
  30. ReText.Name = "ReText"
  31. ReText.Parent = Main
  32. ReText.BackgroundColor3 = Color3.new(0, 0, 0)
  33. ReText.BorderColor3 = Color3.new(0, 0, 0)
  34. ReText.Size = UDim2.new(0, 216, 0, 22)
  35. ReText.Font = Enum.Font.SciFi
  36. ReText.Text = "LumberTycoonCheat"
  37. ReText.TextColor3 = Color3.new(1, 1, 1)
  38. ReText.TextSize = 14
  39.  
  40. Speed.Name = "Speed"
  41. Speed.Parent = Main
  42. Speed.BackgroundColor3 = Color3.new(1, 1, 1)
  43. Speed.BorderColor3 = Color3.new(0, 0, 0)
  44. Speed.Position = UDim2.new(0.027777778, 0, 0.0920502022, 0)
  45. Speed.Size = UDim2.new(0, 73, 0, 26)
  46. Speed.Font = Enum.Font.SciFi
  47. Speed.Text = "Speed"
  48. Speed.TextColor3 = Color3.new(0, 0, 0)
  49. Speed.TextSize = 14
  50. Speed.MouseButton1Down:connect(function()
  51. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 150
  52. end)
  53.  
  54. FlyE.Name = "FlyE"
  55. FlyE.Parent = Main
  56. FlyE.BackgroundColor3 = Color3.new(1, 1, 1)
  57. FlyE.BorderColor3 = Color3.new(0, 0, 0)
  58. FlyE.Position = UDim2.new(0.625, 0, 0.0920502022, 0)
  59. FlyE.Size = UDim2.new(0, 73, 0, 26)
  60. FlyE.Font = Enum.Font.SciFi
  61. FlyE.Text = "Fly [E]"
  62. FlyE.TextColor3 = Color3.new(0, 0, 0)
  63. FlyE.TextSize = 14
  64. FlyE.MouseButton1Down:connect(function()
  65. local humanoid = game:GetService("Players").LocalPlayer.Character.Humanoid
  66. if humanoid.RigType == Enum.HumanoidRigType.R15 then
  67. game:GetService('Players').LocalPlayer.Character.Humanoid.Name = "Humanoida"
  68. repeat wait()
  69. until game:GetService"Players".LocalPlayer and game:GetService"Players".LocalPlayer.Character and game:GetService"Players".LocalPlayer.Character:findFirstChild("UpperTorso") and game:GetService"Players".LocalPlayer.Character:findFirstChild("Humanoida")
  70. local mouse = game:GetService"Players".LocalPlayer:GetMouse()
  71. repeat wait() until mouse
  72. local plr = game:GetService"Players".LocalPlayer
  73. local torso = plr.Character.UpperTorso
  74. local flying = true
  75. local deb = true
  76. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  77. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  78. local maxspeed = 100
  79. local speed = 0
  80. function Fly()
  81. local bg = Instance.new("BodyGyro", torso)
  82. bg.P = 9e4
  83. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  84. bg.cframe = torso.CFrame
  85. local bv = Instance.new("BodyVelocity", torso)
  86. bv.velocity = Vector3.new(0,0.1,0)
  87. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  88. repeat wait()
  89. plr.Character.Humanoida.PlatformStand = true
  90. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  91. speed = speed+.5+(speed/maxspeed)
  92. if speed > maxspeed then
  93. speed = maxspeed
  94. end
  95. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  96. speed = speed-1
  97. if speed < 0 then
  98. speed = 0
  99. end
  100. end
  101. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  102. bv.velocity = ((game:GetService("Workspace").CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game:GetService("Workspace").CurrentCamera.CoordinateFrame.p))*speed
  103. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  104. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  105. bv.velocity = ((game:GetService("Workspace").CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game:GetService("Workspace").CurrentCamera.CoordinateFrame.p))*speed
  106. else
  107. bv.velocity = Vector3.new(0,0.1,0)
  108. end
  109. bg.cframe = game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  110. until not flying
  111. ctrl = {f = 0, b = 0, l = 0, r = 0}
  112. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  113. speed = 0
  114. bg:Destroy()
  115. bv:Destroy()
  116. plr.Character.Humanoida.PlatformStand = false
  117. end
  118. mouse.KeyDown:connect(function(key)
  119. if key:lower() == "e" then
  120. if flying then flying = false
  121. else
  122. flying = true
  123. Fly()
  124. end
  125. elseif key:lower() == "w" then
  126. ctrl.f = 1
  127. elseif key:lower() == "s" then
  128. ctrl.b = -1
  129. elseif key:lower() == "a" then
  130. ctrl.l = -1
  131. elseif key:lower() == "d" then
  132. ctrl.r = 1
  133. end
  134. end)
  135. mouse.KeyUp:connect(function(key)
  136. if key:lower() == "w" then
  137. ctrl.f = 0
  138. elseif key:lower() == "s" then
  139. ctrl.b = 0
  140. elseif key:lower() == "a" then
  141. ctrl.l = 0
  142. elseif key:lower() == "d" then
  143. ctrl.r = 0
  144. end
  145. end)
  146. Fly()
  147. else
  148. repeat wait()
  149. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  150. local mouse = game.Players.LocalPlayer:GetMouse()
  151. repeat wait() until mouse
  152. local plr = game.Players.LocalPlayer
  153. local torso = plr.Character.Torso
  154. local flying = true
  155. local deb = true
  156. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  157. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  158. local maxspeed = 50
  159. local speed = 0
  160.  
  161. function Fly()
  162. local bg = Instance.new("BodyGyro", torso)
  163. bg.P = 9e4
  164. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  165. bg.cframe = torso.CFrame
  166. local bv = Instance.new("BodyVelocity", torso)
  167. bv.velocity = Vector3.new(0,0.1,0)
  168. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  169. repeat wait()
  170. plr.Character.Humanoid.PlatformStand = true
  171. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  172. speed = speed+.5+(speed/maxspeed)
  173. if speed > maxspeed then
  174. speed = maxspeed
  175. end
  176. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  177. speed = speed-1
  178. if speed < 0 then
  179. speed = 0
  180. end
  181. end
  182. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  183. 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
  184. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  185. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  186. 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
  187. else
  188. bv.velocity = Vector3.new(0,0.1,0)
  189. end
  190. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  191. until not flying
  192. ctrl = {f = 0, b = 0, l = 0, r = 0}
  193. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  194. speed = 0
  195. bg:Destroy()
  196. bv:Destroy()
  197. plr.Character.Humanoid.PlatformStand = false
  198. end
  199. mouse.KeyDown:connect(function(key)
  200. if key:lower() == "e" then
  201. if flying then flying = false
  202. else
  203. flying = true
  204. Fly()
  205. end
  206. elseif key:lower() == "w" then
  207. ctrl.f = 1
  208. elseif key:lower() == "s" then
  209. ctrl.b = -1
  210. elseif key:lower() == "a" then
  211. ctrl.l = -1
  212. elseif key:lower() == "d" then
  213. ctrl.r = 1
  214. end
  215. end)
  216. mouse.KeyUp:connect(function(key)
  217. if key:lower() == "w" then
  218. ctrl.f = 0
  219. elseif key:lower() == "s" then
  220. ctrl.b = 0
  221. elseif key:lower() == "a" then
  222. ctrl.l = 0
  223. elseif key:lower() == "d" then
  224. ctrl.r = 0
  225. end
  226. end)
  227. Fly()
  228. end
  229. end)
  230.  
  231. Gravity.Name = "Gravity"
  232. Gravity.Parent = Main
  233. Gravity.BackgroundColor3 = Color3.new(1, 1, 1)
  234. Gravity.BorderColor3 = Color3.new(0, 0, 0)
  235. Gravity.Position = UDim2.new(0.027777791, 0, 0.242677808, 0)
  236. Gravity.Size = UDim2.new(0, 73, 0, 26)
  237. Gravity.Font = Enum.Font.SciFi
  238. Gravity.Text = "Gravity"
  239. Gravity.TextColor3 = Color3.new(0, 0, 0)
  240. Gravity.TextSize = 14
  241. Gravity.MouseButton1Down:connect(function()
  242. game.Workspace.Gravity = 32
  243. end)
  244.  
  245.  
  246. TextButton.Parent = Main
  247. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  248. TextButton.BorderColor3 = Color3.new(0, 0, 0)
  249. TextButton.Position = UDim2.new(0.625, 0, 0.242677808, 0)
  250. TextButton.Size = UDim2.new(0, 73, 0, 26)
  251. TextButton.Font = Enum.Font.SciFi
  252. TextButton.Text = "CtrlTp"
  253. TextButton.TextColor3 = Color3.new(0, 0, 0)
  254. TextButton.TextSize = 14
  255. TextButton.MouseButton1Down:connect(function()
  256. local UIS = game:GetService("UserInputService")
  257.  
  258. local Player = game.Players.LocalPlayer
  259. local Mouse = Player:GetMouse()
  260.  
  261.  
  262. function GetCharacter()
  263. return game.Players.LocalPlayer.Character
  264. end
  265.  
  266. function Teleport(pos)
  267. local Char = GetCharacter()
  268. if Char then
  269. Char:MoveTo(pos)
  270. end
  271. end
  272.  
  273.  
  274. UIS.InputBegan:Connect(function(input)
  275. if input.UserInputType == Enum.UserInputType.MouseButton1 and UIS:IsKeyDown(Enum.KeyCode.LeftControl) then
  276. Teleport(Mouse.Hit.p)
  277. end
  278. end)
  279. end)
  280.  
  281. TextButton_2.Parent = Main
  282. TextButton_2.BackgroundColor3 = Color3.new(1, 1, 1)
  283. TextButton_2.BorderColor3 = Color3.new(0, 0, 0)
  284. TextButton_2.Position = UDim2.new(0.027777791, 0, 0.389121324, 0)
  285. TextButton_2.Size = UDim2.new(0, 73, 0, 26)
  286. TextButton_2.Font = Enum.Font.SciFi
  287. TextButton_2.Text = "AltDelete"
  288. TextButton_2.TextColor3 = Color3.new(0, 0, 0)
  289. TextButton_2.TextSize = 14
  290. TextButton_2.MouseButton1Down:connect(function()
  291. local Plr = game:GetService("Players").LocalPlayer
  292. local Mouse = Plr:GetMouse()
  293.  
  294. Mouse.Button1Down:connect(function()
  295. if not game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftAlt) then return end
  296. if not Mouse.Target then return end
  297. Mouse.Target:Destroy()
  298. end)
  299. end)
  300.  
  301. TextButton_3.Parent = Main
  302. TextButton_3.BackgroundColor3 = Color3.new(1, 1, 1)
  303. TextButton_3.BorderColor3 = Color3.new(0, 0, 0)
  304. TextButton_3.Position = UDim2.new(0.625, 0, 0.389121324, 0)
  305. TextButton_3.Size = UDim2.new(0, 73, 0, 26)
  306. TextButton_3.Font = Enum.Font.SciFi
  307. TextButton_3.Text = "InfJump"
  308. TextButton_3.TextColor3 = Color3.new(0, 0, 0)
  309. TextButton_3.TextSize = 14
  310. TextButton_3.MouseButton1Down:connect(function()
  311. local Player = game:GetService'Players'.LocalPlayer;
  312. local UIS = game:GetService'UserInputService';
  313.  
  314. _G.JumpHeight = 50;
  315.  
  316. function Action(Object, Function) if Object ~= nil then Function(Object); end end
  317.  
  318. UIS.InputBegan:connect(function(UserInput)
  319. if UserInput.UserInputType == Enum.UserInputType.Keyboard and UserInput.KeyCode == Enum.KeyCode.Space then
  320. Action(Player.Character.Humanoid, function(self)
  321. if self:GetState() == Enum.HumanoidStateType.Jumping or self:GetState() == Enum.HumanoidStateType.Freefall then
  322. Action(self.Parent.HumanoidRootPart, function(self)
  323. self.Velocity = Vector3.new(0, _G.JumpHeight, 0);
  324. end)
  325. end
  326. end)
  327. end
  328. end)
  329. end)
  330.  
  331.  
  332.  
  333. ReText_2.Name = "ReText"
  334. ReText_2.Parent = Main
  335. ReText_2.BackgroundColor3 = Color3.new(0, 0, 0)
  336. ReText_2.BorderColor3 = Color3.new(0, 0, 0)
  337. ReText_2.Position = UDim2.new(0, 0, 0.907949805, 0)
  338. ReText_2.Size = UDim2.new(0, 216, 0, 22)
  339. ReText_2.Font = Enum.Font.SciFi
  340. ReText_2.Text = "Made by xCodeError"
  341. ReText_2.TextColor3 = Color3.new(1, 1, 1)
  342. ReText_2.TextSize = 14
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement