Upscalefanatic3

Lumber Tycoon 2 Easy Money

Oct 31st, 2017
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.35 KB | None | 0 0
  1. --[[
  2. UI and 90% of scripting scripted from scratch by DrSTaTTiK
  3. I know I didn't ask for sigmas GreyWood script but credit to him
  4. the user by the name of joseph2235(Your're welcome) provided the
  5. script made by sigma.
  6. Please give to ye boy DrSTaTTiK credit for his work.
  7.  
  8. THANKS!!
  9. --]]
  10.  
  11. local service = setmetatable({}, {
  12. __index = function(t, k)
  13. return game:GetService(k)
  14. end
  15. })
  16.  
  17. if service.Players.LocalPlayer.PlayerGui:FindFirstChild("DrSTaTTiK") then
  18. service.Players.LocalPlayer.PlayerGui:FindFirstChild("DrSTaTTiK"):Destroy()
  19. end
  20.  
  21. function Create(cls,props)
  22. local inst = Instance.new(cls)
  23. for i,v in pairs(props) do
  24. inst[i] = v
  25. end
  26. return inst
  27. end
  28.  
  29. local HitPoints={
  30. ['GoldAxe']= 50;
  31. ['BasicHatchet']= 0.2;
  32. ['Axe1']= 0.55;
  33. ['Axe2']= 0.93;
  34. ['AxeAlphaTesters']= 1.5;
  35. ['Rukiryaxe']= 1.68;
  36. ['Axe3']= 1.45;
  37. ['AxeBetaTesters']= 1.45;
  38. ['FireAxe']= 0.6;
  39. ['SilverAxe']= 1.6;
  40. ['EndTimesAxe']= 10000000;
  41. ['AxeChicken']= 0.1;
  42. ['CandyCaneAxe']= 0;
  43. }
  44.  
  45. local WayPointss = {
  46. ["Spawn"] = CFrame.new(155, 3, 74),
  47. ["Wood R Us"] = CFrame.new(265, 3, 57),
  48. ["Land Store"] = CFrame.new(258, 3, -99),
  49. ["Dock"] = CFrame.new(1114, -1, -197),
  50. ["Link's Logic"] = CFrame.new(4605, 3, -727),
  51. ["Cave"] = CFrame.new(3581, -179, 430),
  52. ["Volcano"] = CFrame.new(-1585, 622, 1140),
  53. ["Swamp"] = CFrame.new(-1209, 132, -801),
  54. ["Palm Island"] = CFrame.new(2549, -5, -42),
  55. ["Fancy Furnishings"] = CFrame.new(491, 3, -1720),
  56. ["Boxed Cars"] = CFrame.new(509, 3, -1463),
  57. ["Fine Arts Shop"] = CFrame.new(5207, -166, 719),
  58. ["Bob's Shack"] = CFrame.new(260, 8, -2542),
  59. ["Bridge"] = CFrame.new(113, 11, -977),
  60. ["End Times"] = CFrame.new(113, -214, -951),
  61. ["Shrine of Sight"] = CFrame.new(-1600, 195, 919),
  62. ["The Den"] = CFrame.new(323, 41, 1930),
  63. ["Volcano Win"] = CFrame.new(-1675, 348, 1476),
  64. ["Ski Lodge"] = CFrame.new(1244, 62, 2306),
  65. ["Strange Man"] = CFrame.new(1061, 16, 1131)
  66. }
  67.  
  68. function GetAxe()
  69. if service.Players.LocalPlayer.Character:FindFirstChild("Tool") then
  70. return service.Players.LocalPlayer.Character:FindFirstChild("Tool")
  71. end
  72. end
  73.  
  74. function SetTransOfShadow(Trans,UI)
  75. for i,v in pairs(UI:GetChildren()) do
  76. if v.Name=="Shadow" then
  77. v.Transparency=Trans
  78. end
  79. end
  80. end
  81.  
  82. function MakeShadow(UI,Index)
  83. Create("Frame",{Parent=UI,Size=UDim2.new(1,0,1,0),ZIndex=Index,Position=UDim2.new(0,1,0,1),BackgroundColor3=Color3.fromRGB(0,0,0),BorderSizePixel=0,Transparency=0.9,Name="Shadow"})
  84. Create("Frame",{Parent=UI,Size=UDim2.new(1,0,1,0),ZIndex=Index,Position=UDim2.new(0,2,0,2),BackgroundColor3=Color3.fromRGB(0,0,0),BorderSizePixel=0,Transparency=0.9,Name="Shadow"})
  85. Create("Frame",{Parent=UI,Size=UDim2.new(1,0,1,0),ZIndex=Index,Position=UDim2.new(0,3,0,3),BackgroundColor3=Color3.fromRGB(0,0,0),BorderSizePixel=0,Transparency=0.9,Name="Shadow"})
  86. end
  87.  
  88. local Glitching=false
  89. local Main = Create("ScreenGui",{Parent=service.Players.LocalPlayer.PlayerGui,Name="DrSTaTTiK"})
  90. local Open = Create("TextButton",{Parent=Main,Size=UDim2.new(0,40,0,20),ZIndex=2,Position=UDim2.new(.5,-20,.9,-10),Text="Open",BackgroundColor3=Color3.fromRGB(218, 114, 45),BorderSizePixel=0})
  91. local Hub = Create("Frame",{Parent=Main,Size=UDim2.new(0,400,0,300),Position=UDim2.new(.3,0,.5,0),Draggable=true,Visible=false,Transparency=1,ZIndex=100,Active=true})
  92. local TopBar = Create("Frame",{Parent=Hub,Size=UDim2.new(1,0,.1,0),BackgroundColor3=Color3.fromRGB(218, 114, 45),BorderSizePixel=0,ZIndex=4})
  93. local Exit = Create("TextButton",{Parent=TopBar,ZIndex=4,Size=UDim2.new(.075,0,1,0),Position=UDim2.new(.925,0,0,0),TextScaled=false,TextSize=14,BackgroundTransparency=1,Text="X"})
  94. local Name = Create("TextLabel",{Parent=TopBar,ZIndex=4,Size=UDim2.new(.5,0,1,0),Position=UDim2.new(0,10,0,0),TextStrokeTransparency=0.9,Text="Produced by DrSTaTTiK",TextColor3=Color3.fromRGB(230,230,230),BackgroundTransparency=1,TextXAlignment="Left",BorderSizePixel=0})
  95. local Menu = Create("ImageLabel",{Parent=Hub,Size=UDim2.new(1,0,.9,0),ZIndex=2,ImageColor3=Color3.fromRGB(100,100,100),ScaleType="Tile",TileSize=UDim2.new(0,100,0,100),Image="rbxassetid://585867512",Position=UDim2.new(0,0,.1,0),BorderSizePixel=0})
  96. local TPWood = Create("TextButton",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.25,0,.1,0),Position=UDim2.new(0,10,0,10),Text="TPWood",BorderSizePixel=0})
  97. local TPWoodToSell = Create("TextButton",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.25,0,.1,0),Position=UDim2.new(.75,-10,0,10),Text="Sell Wood",BorderSizePixel=0})
  98. --local TPWoodToPrecess = Create("TextButton",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.25,0,.1,0),Position=UDim2.new(.75,-10,0.1,20),Text="Process Wood",BorderSizePixel=0})
  99. local GlitchWood = Create("TextButton",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.25,0,.1,0),Position=UDim2.new(0,10,0.1,20),Text="GlitchWood: Off",BorderSizePixel=0})
  100. local WalkSpeed = Create("TextBox",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.1,0,.1,0),Position=UDim2.new(0.15,10,0.2,30),Text="16",BorderSizePixel=0})
  101. local WalkSpeedName = Create("TextLabel",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.125,0,.1,0),Position=UDim2.new(0,1,0.2,30),Text="WalkSpeed:",TextSize=8,TextXAlignment="Left",BorderSizePixel=0,TextColor3=Color3.fromRGB(255,255,255),BackgroundTransparency=1})
  102. local JumpPower = Create("TextBox",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.1,0,.1,0),Position=UDim2.new(.15,10,0.3,40),Text="50",BorderSizePixel=0})
  103. local JumpPowerName = Create("TextLabel",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.125,0,.1,0),Position=UDim2.new(0,1,0.3,40),Text="JumpPower:",TextSize=8,TextXAlignment="Left",BorderSizePixel=0,TextColor3=Color3.fromRGB(255,255,255),BackgroundTransparency=1})
  104. local TabDistance = Create("TextLabel",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.25,0,.1,0),Position=UDim2.new(0.35,0,0.02,20),Text="Length",TextColor3=Color3.fromRGB(255,255,255),BackgroundTransparency=1,BorderSizePixel=0})
  105. local Distance = Create("TextBox",{Parent=Menu,ZIndex=4,Size=UDim2.new(0.25,0,.1,0),Position=UDim2.new(0.35,0,0.1,20),BackgroundColor3=Color3.fromRGB(200,200,200),Text="50",BorderSizePixel=0})
  106. local Hub2 = Create("Frame",{Parent=Main,Size=UDim2.new(0,150,0,300),Position=UDim2.new(.3,410,.5,0),Draggable=true,Visible=false,Transparency=1,ZIndex=100,Active=true})
  107. local TopBar2 = Create("Frame",{Parent=Hub2,Size=UDim2.new(1,0,.1,0),BackgroundColor3=Color3.fromRGB(218, 114, 45),BorderSizePixel=0,ZIndex=4})
  108. local Name2 = Create("TextLabel",{Parent=TopBar2,ZIndex=4,Size=UDim2.new(.5,0,1,0),Position=UDim2.new(0,10,0,0),TextStrokeTransparency=0.9,Text="WayPoints",TextColor3=Color3.fromRGB(230,230,230),BackgroundTransparency=1,TextXAlignment="Left",BorderSizePixel=0})
  109. local Menu2 = Create("ImageLabel",{Parent=Hub2,Size=UDim2.new(1,0,.9,0),ZIndex=2,ImageColor3=Color3.fromRGB(100,100,100),ScaleType="Tile",TileSize=UDim2.new(0,100,0,100),Image="rbxassetid://585867512",Position=UDim2.new(0,0,.1,0),BorderSizePixel=0})
  110. local WayPoints = Create("ScrollingFrame",{Parent=Menu2,ZIndex=4,BorderSizePixel=0,Size=UDim2.new(.8,0,.9,0),BackgroundColor3=Color3.fromRGB(50,50,50),Position=UDim2.new(.1,0,0.05,0),ScrollBarThickness=0,Transparency=0.8})
  111. local Hub3 = Create("Frame",{Parent=Main,Size=UDim2.new(0,150,0,300),Position=UDim2.new(.3,-160,.5,0),Draggable=true,Visible=false,Transparency=1,ZIndex=100,Active=true})
  112. local TopBar3 = Create("Frame",{Parent=Hub3,Size=UDim2.new(1,0,.1,0),BackgroundColor3=Color3.fromRGB(218, 114, 45),BorderSizePixel=0,ZIndex=4})
  113. local Name3 = Create("TextLabel",{Parent=TopBar3,ZIndex=4,Size=UDim2.new(.5,0,1,0),Position=UDim2.new(0,10,0,0),TextStrokeTransparency=0.9,Text="Player Bases",TextColor3=Color3.fromRGB(230,230,230),BackgroundTransparency=1,TextXAlignment="Left",BorderSizePixel=0})
  114. local Menu3 = Create("ImageLabel",{Parent=Hub3,Size=UDim2.new(1,0,.9,0),ZIndex=2,ImageColor3=Color3.fromRGB(100,100,100),ScaleType="Tile",TileSize=UDim2.new(0,100,0,100),Image="rbxassetid://585867512",Position=UDim2.new(0,0,.1,0),BorderSizePixel=0})
  115. local PlayersBases = Create("ScrollingFrame",{Parent=Menu3,ZIndex=4,BorderSizePixel=0,Size=UDim2.new(.8,0,.9,0),BackgroundColor3=Color3.fromRGB(50,50,50),Position=UDim2.new(.1,0,0.05,0),ScrollBarThickness=0,Transparency=0.8})
  116. local Hub4 = Create("Frame",{Parent=Main,Size=UDim2.new(0,150,0,300),Position=UDim2.new(.3,-330,.5,0),Draggable=true,Visible=false,Transparency=1,ZIndex=100,Active=true})
  117. local Menu4 = Create("ImageLabel",{Parent=Hub4,Size=UDim2.new(1,0,.9,0),ZIndex=2,ImageColor3=Color3.fromRGB(100,100,100),ScaleType="Tile",TileSize=UDim2.new(0,100,0,100),Image="rbxassetid://585867512",Position=UDim2.new(0,0,.1,0),BorderSizePixel=0})
  118. local TopBar4 = Create("Frame",{Parent=Hub4,Size=UDim2.new(1,0,.1,0),BackgroundColor3=Color3.fromRGB(218, 114, 45),BorderSizePixel=0,ZIndex=4})
  119. local Name3 = Create("TextLabel",{Parent=TopBar4,ZIndex=4,Size=UDim2.new(.5,0,1,0),Position=UDim2.new(0,10,0,0),TextStrokeTransparency=0.9,Text="Players",TextColor3=Color3.fromRGB(230,230,230),BackgroundTransparency=1,TextXAlignment="Left",BorderSizePixel=0})
  120. local Players = Create("ScrollingFrame",{Parent=Menu4,ZIndex=4,BorderSizePixel=0,Size=UDim2.new(.8,0,.9,0),BackgroundColor3=Color3.fromRGB(50,50,50),Position=UDim2.new(.1,0,0.05,0),ScrollBarThickness=0,Transparency=0.8})
  121. local TeleportToSpook = Create("TextButton",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.25,0,.1,0),Position=UDim2.new(0,10,0.4,50),Text="Teleport to Spook",BorderSizePixel=0})
  122. local BlueprintToGreyWood = Create("TextButton",{Parent=Menu,ZIndex=3,Size=UDim2.new(0.25,0,.1,0),Position=UDim2.new(0,10,0.5,60),Text="Blueprint to\nGreyWood",BorderSizePixel=0})
  123. local Warning = Create("TextLabel",{Parent=Hub,ZIndex=4,Size=UDim2.new(.5,0,1,5),Position=UDim2.new(0,0,.5,10),TextStrokeTransparency=0.7,Text="Press or hold E to use the GlitchWood option.\nAfter clicking Blueprint to GreyWood pick the blueprint up then palce it back down with B/E",TextColor3=Color3.fromRGB(218, 114, 45),BackgroundTransparency=1,TextXAlignment="Left",BorderSizePixel=0})
  124. local WarningGreyWood = Create("TextLabel",{Parent=Hub,ZIndex=4,Size=UDim2.new(.5,0,1,55),Position=UDim2.new(0,0,.5,10),TextStrokeTransparency=0.7,Text="Some Blueprints do not turn to GreyWood so if you lose a Blueprint oh well. \nand dont try to cut trees with their corresponding super tree you will die.",TextColor3=Color3.fromRGB(255, 0, 0),BackgroundTransparency=1,TextXAlignment="Left",BorderSizePixel=0})
  125. local Minimize = Create("TextButton",{Parent=TopBar,ZIndex=4,Size=UDim2.new(.1,0,1,0),Position=UDim2.new(.85,0,0,0),TextScaled=true,TextSize=14,BackgroundTransparency=1,Text="-"})
  126. local Minimize2 = Create("TextButton",{Parent=TopBar2,ZIndex=4,Size=UDim2.new(.1,0,1,0),Position=UDim2.new(.85,0,0,0),TextScaled=true,TextSize=14,BackgroundTransparency=1,Text="-"})
  127. local Minimize3 = Create("TextButton",{Parent=TopBar3,ZIndex=4,Size=UDim2.new(.1,0,1,0),Position=UDim2.new(.85,0,0,0),TextScaled=true,TextSize=14,BackgroundTransparency=1,Text="-"})
  128. local Minimize4 = Create("TextButton",{Parent=TopBar4,ZIndex=4,Size=UDim2.new(.1,0,1,0),Position=UDim2.new(.85,0,0,0),TextScaled=true,TextSize=14,BackgroundTransparency=1,Text="-"})
  129.  
  130.  
  131. MakeShadow(TopBar,3)
  132. MakeShadow(Hub,1)
  133. MakeShadow(Hub2,1)
  134. MakeShadow(TopBar2,3)
  135. MakeShadow(Hub3,1)
  136. MakeShadow(TopBar3,3)
  137. MakeShadow(Hub4,1)
  138. MakeShadow(TopBar4,3)
  139. MakeShadow(TPWood,2)
  140. MakeShadow(GlitchWood,2)
  141. MakeShadow(Distance,2)
  142. MakeShadow(Open,0)
  143. MakeShadow(WalkSpeed,2)
  144. MakeShadow(JumpPower,2)
  145. MakeShadow(TPWoodToSell,2)
  146. MakeShadow(TeleportToSpook,2)
  147. --MakeShadow(TPWoodToPrecess,2)
  148. MakeShadow(BlueprintToGreyWood,2)
  149.  
  150. local numb=0
  151. for key,value in next, WayPointss do
  152. WayPoints.CanvasSize=UDim2.new(0,0,0,30*numb)
  153. local button = Create("TextButton",{Parent=WayPoints,Text=key,Size=UDim2.new(1,0,0,20),ZIndex=4,BorderSizePixel=0,Position=UDim2.new(0,0,0,30*numb)})
  154. MakeShadow(button,3)
  155. numb=numb+1
  156. button.MouseButton1Click:Connect(function()
  157. service.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(value.p+Vector3.new(0,5,0))
  158. end)
  159. end
  160. local numbb=0
  161. for i,v in pairs(service.Workspace.Properties:GetChildren()) do
  162. if v.Owner and v.Owner.Value then
  163. PlayersBases.CanvasSize=UDim2.new(0,0,0,30*numbb)
  164. local button = Create("TextButton",{Parent=PlayersBases,Text=v.Owner.Value.Name,Size=UDim2.new(1,0,0,20),ZIndex=4,BorderSizePixel=0,Position=UDim2.new(0,0,0,30*numbb)})
  165. MakeShadow(button,3)
  166. numbb=numbb+1
  167. button.MouseButton1Click:Connect(function()
  168. service.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(v.OriginSquare.Position+Vector3.new(0,5,0))
  169. end)
  170. end
  171. v.Owner.Changed:Connect(function()
  172. numbb=0
  173. PlayersBases:ClearAllChildren()
  174. for i,v in pairs(service.Workspace.Properties:GetChildren()) do
  175. if v.Owner and v.Owner.Value then
  176. PlayersBases.CanvasSize=UDim2.new(0,0,0,30*numbb)
  177. local button = Create("TextButton",{Parent=PlayersBases,Text=v.Owner.Value.Name,Size=UDim2.new(1,0,0,20),ZIndex=4,BorderSizePixel=0,Position=UDim2.new(0,0,0,30*numbb)})
  178. MakeShadow(button,3)
  179. numbb=numbb+1
  180. button.MouseButton1Click:Connect(function()
  181. service.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(v.OriginSquare.Position+Vector3.new(0,5,0))
  182. end)
  183. end
  184. end
  185. numbb=0
  186. end)
  187. end
  188.  
  189. local numbbb=0
  190. for i,v in pairs(service.Players:GetPlayers()) do
  191. if v.Character then
  192. Players.CanvasSize=UDim2.new(0,0,0,30*numbbb)
  193. local button = Create("TextButton",{Parent=Players,Text=v.Name,Size=UDim2.new(1,0,0,20),ZIndex=4,BorderSizePixel=0,Position=UDim2.new(0,0,0,30*numbbb)})
  194. MakeShadow(button,3)
  195. numbbb=numbbb+1
  196. button.MouseButton1Click:Connect(function()
  197. service.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(v.Character.HumanoidRootPart.Position+Vector3.new(0,5,0))
  198. end)
  199. end
  200. end
  201. service.Players.PlayerAdded:Connect(function()
  202. numbbb=0
  203. Players:ClearAllChildren()
  204. for i,v in pairs(service.Players:GetPlayers()) do
  205. while not v.Character do wait() end
  206. if v.Character then
  207. Players.CanvasSize=UDim2.new(0,0,0,30*numbbb)
  208. local button = Create("TextButton",{Parent=Players,Text=v.Name,Size=UDim2.new(1,0,0,20),ZIndex=4,BorderSizePixel=0,Position=UDim2.new(0,0,0,30*numbbb)})
  209. MakeShadow(button,3)
  210. numbbb=numbbb+1
  211. button.MouseButton1Click:Connect(function()
  212. service.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(v.Character.HumanoidRootPart.Position+Vector3.new(0,5,0))
  213. end)
  214. end
  215. end
  216. numbbb=0
  217. end)
  218. service.Players.PlayerRemoving:Connect(function()
  219. numbbb=0
  220. Players:ClearAllChildren()
  221. for i,v in pairs(service.Players:GetPlayers()) do
  222. if v.Character then
  223. Players.CanvasSize=UDim2.new(0,0,0,30*numbbb)
  224. local button = Create("TextButton",{Parent=Players,Text=v.Name,Size=UDim2.new(1,0,0,20),ZIndex=4,BorderSizePixel=0,Position=UDim2.new(0,0,0,30*numbbb)})
  225. MakeShadow(button,3)
  226. numbbb=numbbb+1
  227. button.MouseButton1Click:Connect(function()
  228. service.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(v.Character.HumanoidRootPart.Position+Vector3.new(0,5,0))
  229. end)
  230. end
  231. end
  232. numbbb=0
  233. end)
  234.  
  235. Minimize.MouseButton1Click:Connect(function()
  236. if Menu.Visible==true then
  237. Menu.Visible=false
  238. Warning.Visible=false
  239. SetTransOfShadow(1,Hub)
  240. else
  241. Menu.Visible=true
  242. Warning.Visible=true
  243. SetTransOfShadow(0.9,Hub)
  244. end
  245. end)
  246.  
  247. Minimize2.MouseButton1Click:Connect(function()
  248. if Menu2.Visible==true then
  249. Menu2.Visible=false
  250. SetTransOfShadow(1,Hub2)
  251. else
  252. Menu2.Visible=true
  253. SetTransOfShadow(0.9,Hub2)
  254. end
  255. end)
  256.  
  257. Minimize3.MouseButton1Click:Connect(function()
  258. if Menu3.Visible==true then
  259. Menu3.Visible=false
  260. SetTransOfShadow(1,Hub3)
  261. else
  262. Menu3.Visible=true
  263. SetTransOfShadow(0.9,Hub3)
  264. end
  265. end)
  266.  
  267. Minimize4.MouseButton1Click:Connect(function()
  268. if Menu4.Visible==true then
  269. Menu4.Visible=false
  270. SetTransOfShadow(1,Hub4)
  271. else
  272. Menu4.Visible=true
  273. SetTransOfShadow(0.9,Hub4)
  274. end
  275. end)
  276.  
  277. Exit.MouseButton1Click:Connect(function()
  278. if Hub.Visible then
  279. Hub.Visible=false
  280. Hub2.Visible=false
  281. Hub3.Visible=false
  282. Hub4.Visible=false
  283. Open.Visible=true
  284. end
  285. end)
  286.  
  287. Open.MouseButton1Click:Connect(function()
  288. if not Hub.Visible then
  289. Hub.Visible=true
  290. Hub2.Visible=true
  291. Hub3.Visible=true
  292. Hub4.Visible=true
  293. Open.Visible=false
  294. end
  295. end)
  296. local Walk=16
  297. local Jump=100
  298.  
  299. WalkSpeed.Changed:Connect(function()
  300. Walk=tonumber(WalkSpeed.Text)
  301. end)
  302.  
  303. BlueprintToGreyWood.MouseButton1Click:Connect(function()
  304. for i,v in next,workspace.PlayerModels:GetChildren() do
  305. if v:FindFirstChild("Type") then
  306. if v.Type.Value == "Blueprint" then
  307. v.Type.Value = "Structure"
  308. end
  309. end
  310. end
  311. end)
  312.  
  313. JumpPower.Changed:Connect(function()
  314. Jump=tonumber(JumpPower.Text)
  315. end)
  316.  
  317. service.Players.LocalPlayer.Character.Humanoid.Changed:Connect(function()
  318. service.Players.LocalPlayer.Character.Humanoid.WalkSpeed=Walk
  319. service.Players.LocalPlayer.Character.Humanoid.JumpPower=Jump
  320. end)
  321.  
  322. BlueprintToGreyWood.MouseButton1Click:Connect(function()
  323. for i,v in next,workspace.PlayerModels:GetChildren() do
  324. if v:FindFirstChild("Type") then
  325. if v.Type.Value == "Blueprint" then
  326. v.Type.Value = "Structure"
  327. end
  328. end
  329. end
  330. end)
  331.  
  332. TPWood.MouseButton1Click:Connect(function()
  333. for _, Log in pairs(service.Workspace.LogModels:GetChildren()) do
  334. if Log.Name:sub(1, 6) == "Loose_" and Log:findFirstChild("Owner") then
  335. if Log.Owner.Value == service.Players.LocalPlayer then
  336. Log:MoveTo(service.Players.LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0, 20, 0))
  337. for i=1,100 do
  338. service.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(Log)
  339. end
  340. end
  341. end
  342. end
  343. end)
  344.  
  345. TPWoodToSell.MouseButton1Click:Connect(function()
  346. for _, Log in pairs(service.Workspace.LogModels:GetChildren()) do
  347. if Log.Name:sub(1, 6) == "Loose_" and Log:findFirstChild("Owner") then
  348. if Log.Owner.Value == service.Players.LocalPlayer then
  349. for i,v in pairs(Log:GetChildren()) do
  350. if v.Name=="WoodSection" then
  351. spawn(function()
  352. for i=1,10 do
  353. wait()
  354. v.CFrame=CFrame.new(Vector3.new(315, -0.296, 85.791))*CFrame.Angles(math.rad(90),0,0)
  355. end
  356. end)
  357. end
  358. end
  359. spawn(function()
  360. for i=1,20 do
  361. wait()
  362. service.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(Log)
  363. end
  364. end)
  365. end
  366. end
  367. end
  368. end)
  369.  
  370. TeleportToSpook.MouseButton1Click:Connect(function()
  371. for i, v in pairs(game.Workspace:GetChildren()) do
  372. if v.Name == "TreeRegion" then
  373. for j, k in ipairs(v:GetChildren()) do
  374. if k:FindFirstChild("TreeClass") and k.TreeClass.Value == "Spooky" or k:FindFirstChild("TreeClass") and k.TreeClass.Value == "SpookyNeon" then
  375. service.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = k.WoodSection.CFrame*CFrame.new(0,5,0)
  376. break
  377. end
  378. end
  379. end
  380. end
  381. end)
  382.  
  383. GlitchWood.MouseButton1Click:Connect(function()
  384. if not Glitching then
  385. Glitching=true
  386. GlitchWood.Text="GlitchWood: On"
  387. else
  388. Glitching=false
  389. GlitchWood.Text="GlitchWood: Off"
  390. end
  391. end)
  392.  
  393. local Pressing = false
  394.  
  395. game.Players.LocalPlayer:GetMouse().KeyDown:Connect(function(key)
  396. if key=="e" and Glitching then
  397. Pressing=true
  398. poop(GetAxe())
  399. end
  400. end)
  401.  
  402. game.Players.LocalPlayer:GetMouse().KeyUp:Connect(function(key)
  403. if key=="e" then
  404. Pressing=false
  405. end
  406. end)
  407.  
  408. function cut(Height,Tool)
  409. local Tree=game.Players.LocalPlayer:GetMouse().Target
  410. game.ReplicatedStorage.Interaction.RemoteProxy:FireServer(Tree.Parent.CutEvent,{
  411. ["cuttingClass"] = "Axe",
  412. ["cooldown"] = 0,
  413. ["hitPoints"] = HitPoints[Tool.ToolName.Value],
  414. ["sectionId"] = 1,
  415. ["tool"] = Tool,
  416. ["faceVector"] = Vector3.new(-1,0,0),
  417. ["height"] = Height})
  418. end
  419.  
  420. function poop(Tool)
  421. while Pressing do
  422. for i=1,50 do
  423. wait()
  424. cut(tonumber(Distance.Text),Tool)
  425. cut(0,Tool)
  426. end
  427. end
  428. end
  429.  
  430. ----Fly function
  431.  
  432. do
  433. function fly()
  434.  
  435. for i,v in pairs(script:GetChildren()) do
  436. pcall(function() v.Value = "" end)
  437. game:GetService("Debris"):AddItem(v,.1)
  438. end
  439.  
  440. function weld(p0,p1,c0,c1,par)
  441. local w = Instance.new("Weld",p0 or par)
  442. w.Part0 = p0
  443. w.Part1 = p1
  444. w.C0 = c0 or CFrame.new()
  445. w.C1 = c1 or CFrame.new()
  446. return w
  447. end
  448.  
  449. local motors = {}
  450.  
  451. function motor(p0,p1,c0,c1,des,vel,par)
  452. local w = Instance.new("Motor6D",p0 or par)
  453. w.Part0 = p0
  454. w.Part1 = p1
  455. w.C0 = c0 or CFrame.new()
  456. w.C1 = c1 or CFrame.new()
  457. w.MaxVelocity = tonumber(vel) or .05
  458. w.DesiredAngle = tonumber(des) or 0
  459. return w
  460. end
  461.  
  462. function lerp(a,b,c)
  463. return a+(b-a)*c
  464. end
  465.  
  466. function clerp(c1,c2,al)
  467. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  468. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  469. for i,v in pairs(com1) do
  470. com1[i] = lerp(v,com2[i],al)
  471. end
  472. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  473. end
  474.  
  475. function ccomplerp(c1,c2,al)
  476. local com1 = {c1:components()}
  477. local com2 = {c2:components()}
  478. for i,v in pairs(com1) do
  479. com1[i] = lerp(v,com2[i],al)
  480. end
  481. return CFrame.new(unpack(com1))
  482. end
  483.  
  484. function tickwave(time,length,offset)
  485. return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length
  486. end
  487.  
  488. function invcol(c)
  489. c = c.Color
  490. return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r))
  491. end
  492. local oc = oc or function(...) return ... end
  493. local plr = game.Players.LocalPlayer
  494. local char = plr.Character
  495. local tor = char.Torso
  496. local hum = char.Humanoid
  497. hum.PlatformStand = false
  498. pcall(function()
  499. char.Wings:Destroy()
  500. end)
  501. pcall(function()
  502. char.Angel:Destroy() -- hat
  503. end)
  504. local mod = Instance.new("Model",char)
  505. mod.Name = "Wings"
  506. local special = {
  507. [game.Players.LocalPlayer.Name] = {"Black","Bright red",.5,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  508. }
  509. local topcolor = BrickColor.new("Really black")
  510. local feacolor = BrickColor.new("Black")
  511. local ptrans = 0
  512. local pref = 0
  513. local fire = true
  514. local fmcol = Color3.new()
  515. local fscol = Color3.new()
  516. local spec = special[plr.Name:lower()]
  517. if spec then
  518. topcolor,feacolor,ptrans,pref,fire,fmcol,fscol = spec[1] and BrickColor.new(spec[1]) or topcolor,spec[2] and BrickColor.new(spec[2]) or feacolor,spec[3],spec[4],spec[5],spec[6],spec[7]
  519. end
  520. local part = Instance.new("Part")
  521. part.FormFactor = "Custom"
  522. part.Size = Vector3.new(.2,.2,.2)
  523. part.TopSurface,part.BottomSurface = 0,0
  524. part.CanCollide = false
  525. part.BrickColor = BrickColor.new("Black")
  526. part.Transparency = ptrans
  527. part.Reflectance = pref
  528. local ef = Instance.new("Fire",fire and part or nil)
  529. ef.Size = .15
  530. ef.Color = BrickColor.new("Black").Color
  531. ef.SecondaryColor = BrickColor.new("Bright red").Color
  532. part:BreakJoints()
  533. function newpart()
  534. local clone = part:Clone()
  535. clone.Parent = mod
  536. clone:BreakJoints()
  537. return clone
  538. end
  539. local feath = newpart()
  540. feath.BrickColor = feacolor
  541. feath.Transparency = 0
  542. Instance.new("SpecialMesh",feath).MeshType = "Sphere"
  543. function newfeather()
  544. local clone = feath:Clone()
  545. clone.Parent = mod
  546. clone:BreakJoints()
  547. return clone
  548. end
  549.  
  550. ---------- RIGHT WING
  551.  
  552. flying = false
  553. moving = false
  554. for i,v in pairs(tor:GetChildren()) do
  555. if v.ClassName:lower():match("body") then
  556. v:Destroy()
  557. end
  558. end
  559. local ctor = tor:Clone()
  560. ctor:ClearAllChildren()
  561. ctor.Name = "cTorso"
  562. ctor.Transparency = 1
  563. ctor.CanCollide = false
  564. ctor.FormFactor = "Custom"
  565. ctor.Size = Vector3.new(.2,.2,.2)
  566. ctor.Parent = mod
  567. weld(tor,ctor)
  568. local bg = Instance.new("BodyGyro",ctor)
  569. bg.maxTorque = Vector3.new()
  570. bg.P = 15000
  571. bg.D = 1000
  572. local bv = Instance.new("BodyVelocity",ctor)
  573. bv.maxForce = Vector3.new()
  574. bv.P = 15000
  575. vel = Vector3.new()
  576. cf = CFrame.new()
  577. flspd = 0
  578. keysdown = {}
  579. keypressed = {}
  580. ktime = {}
  581. descendtimer = 0
  582. jumptime = tick()
  583. hum.Jumping:connect(function()
  584. jumptime = tick()
  585. end)
  586. cam = workspace.CurrentCamera
  587. kd = plr:GetMouse().KeyDown:connect(oc(function(key)
  588. keysdown[key] = true
  589. keypressed[key] = true
  590. if key == "q" then
  591. descendtimer = tick()
  592. elseif key == " " and not hum.Jump then
  593. jumptime = tick()
  594. elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3 and math.abs(reqrotx) < .3 then
  595. reqrotx = key == "a" and math.pi*2 or -math.pi*2
  596. end
  597. ktime[key] = tick()
  598. end))
  599.  
  600. ku = plr:GetMouse().KeyUp:connect(function(key)
  601. keysdown[key] = false
  602. if key == " " then
  603. descendtimer = tick()
  604. end
  605. end)
  606. function mid(a,b,c)
  607. return math.max(a,math.min(b,c or -a))
  608. end
  609. function bn(a)
  610. return a and 1 or 0
  611. end
  612. function gm(tar)
  613. local m = 0
  614. for i,v in pairs(tar:GetChildren()) do
  615. if v:IsA("BasePart") then
  616. m = m + v:GetMass()
  617. end
  618. m = m + gm(v)
  619. end
  620. return m
  621. end
  622. reqrotx = 0
  623. local grav = 196.2
  624. local con
  625. con = game:GetService("RunService").Stepped:connect(oc(function()
  626. local obvel = tor.CFrame:vectorToObjectSpace(tor.Velocity)
  627. local sspd, uspd,fspd = obvel.X,obvel.Y,obvel.Z
  628. if flying then
  629. local lfldir = fldir
  630. fldir = cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit
  631. local lmoving = moving
  632. moving = fldir.magnitude > .1
  633. if lmoving and not moving then
  634. idledir = lfldir*Vector3.new(1,0,1)
  635. descendtimer = tick()
  636. end
  637. local dbomb = fldir.Y < -.6 or (moving and keysdown["1"])
  638. if moving and keysdown["0"] and lmoving then
  639. fldir = (Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+(fldir*Vector3.new(1,0,1))*.05).unit
  640. end
  641. local down = tor.CFrame:vectorToWorldSpace(Vector3.new(0,-1,0))
  642. local descending = (not moving and keysdown["q"] and not keysdown[" "])
  643. cf = ccomplerp(cf,CFrame.new(tor.Position,tor.Position+(not moving and idledir or fldir)),keysdown["0"] and .02 or .07)
  644. local gdown = not dbomb and cf.lookVector.Y < -.2 and tor.Velocity.unit.Y < .05
  645. hum.PlatformStand = true
  646. bg.maxTorque = Vector3.new(1,1,1)*9e5
  647. local rotvel = CFrame.new(Vector3.new(),tor.Velocity):toObjectSpace(CFrame.new(Vector3.new(),fldir)).lookVector
  648. bg.cframe = cf * CFrame.Angles(not moving and -.1 or -math.pi/2+.2,moving and mid(-2.5,rotvel.X/1.5) + reqrotx or 0,0)
  649. reqrotx = reqrotx - reqrotx/10
  650. bv.maxForce = Vector3.new(1,1,1)*9e4*.5
  651. local anioff =(bn(keysdown[" "])-bn(keysdown["q"]))/2
  652. local ani = tickwave(1.5-anioff,1)
  653. bv.velocity = bv.velocity:Lerp(Vector3.new(0,bn(not moving)*-ani*15+(descending and math.min(20,tick()-descendtimer)*-8 or bn(keysdown[" "])-bn(keysdown["q"]))*15,0)+vel,.6)
  654. vel = moving and cf.lookVector*flspd or Vector3.new()
  655. flspd = math.min(120,lerp(flspd,moving and (fldir.Y<0 and flspd+(-fldir.Y)*grav/60 or math.max(50,flspd-fldir.Y*grav/300)) or 60,.4))
  656. local hit,ray = workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-3.5+math.min(0,bv.velocity.y)/30,0)),{char})
  657. if hit and down.Y < -.85 and tick()-flystart > 1 then
  658. flying = false
  659. hum.PlatformStand = false
  660. tor.Velocity = Vector3.new()
  661. end
  662. else
  663. bg.maxTorque = Vector3.new()
  664. bv.maxForce = Vector3.new()
  665. local x,y,z = fspd/160,uspd/700,sspd/900
  666. if keypressed[" "] and not flying and (tick()-jumptime > .05 and (tick()-jumptime < 3 or hum.Jump)) then
  667. vel = Vector3.new(0,50,0)
  668. bv.velocity = vel
  669. idledir = cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)
  670. cf = tor.CFrame * CFrame.Angles(-.01,0,0)
  671. tor.CFrame = cf
  672. bg.cframe = cf
  673. flystart = tick()
  674. flying = true
  675. end
  676. end
  677. keypressed = {}
  678. end))
  679. end
  680. fly()
  681. end
Add Comment
Please, Sign In to add comment