Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.64 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151.  
  152.  
  153. --Script made by Pedrorb03. Enjoy it ;)
  154.  
  155. --Set Up
  156.  
  157. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = 1
  158. game.Players.LocalPlayer.Character.Humanoid.Health = 1
  159.  
  160.  
  161.  
  162.  
  163. for _,anim in pairs(game.Players.LocalPlayer.Character.Humanoid:GetPlayingAnimationTracks()) do
  164. anim:Stop()
  165. end
  166. game.Players.LocalPlayer.Character.Animate:remove()
  167. for _,part in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  168. if part.ClassName == "Body Colors" or part.ClassName == "Accessory" or part.ClassName == "Pants" or part.ClassName == "Shirt" or part.ClassName == "Shirt Graphic" then
  169. part:remove()
  170. end
  171. end
  172. for _,part in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  173. if part:IsA("BasePart") then
  174. part.BrickColor = BrickColor.new("Pastel brown")
  175. end
  176. end
  177. shirt = Instance.new("Shirt",game.Players.LocalPlayer.Character) shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821325"
  178. pants = Instance.new("Pants",game.Players.LocalPlayer.Character) pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821538"
  179. game.Players.LocalPlayer.Character.Head.Mesh.Scale = Vector3.new(0.45,0.45,0.45)
  180. game.Players.LocalPlayer.Character.Head.Mesh.Offset = Vector3.new(0,0.3,-0.1)
  181. game.Players.LocalPlayer.Character.Head.face:remove()
  182. game.Players.LocalPlayer.Character.Head.Mesh.MeshId = "rbxassetid://494265290"
  183. game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "rbxassetid://494265293"
  184.  
  185. game.Players.LocalPlayer.Character.Head.Jumping.SoundId = "rbxassetid://158309736"
  186. sound = nil
  187.  
  188. while sound == nil do
  189. wait()
  190. sound = Instance.new("Sound")
  191. if sound ~= nil then
  192. break
  193. end
  194. end
  195.  
  196. levelMusic = sound:Clone()
  197. levelMusic.SoundId = "rbxassetid://232553386"
  198. levelMusic.Looped = true
  199. levelMusic.Parent = game.Players.LocalPlayer.Character
  200. levelMusic.Volume = 0.3
  201. levelMusic:Play()
  202. takeCooldown = false
  203.  
  204. lifes = 2
  205.  
  206. lastLife = lifes
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 65
  218. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25
  219. --Map Set Up
  220.  
  221. brick = Instance.new("Part") brick.Anchored = true brick.Size = Vector3.new(3.2,3.2,3.2)
  222. mesh = Instance.new("SpecialMesh",brick) mesh.MeshId = "rbxassetid://1089547491" mesh.TextureId = "rbxassetid://1089552092"
  223. bricks = {}
  224. for _=1,math.random(200,350) do
  225. local part = brick:Clone()
  226. part.CFrame = CFrame.new(math.random(-102400,102400)/100,11,math.random(-102400,102400)/100)
  227. part.Parent = game.Workspace
  228. table.insert(bricks,part)
  229. end
  230.  
  231.  
  232. block = Instance.new("Part") block.Anchored = true block.Size = Vector3.new(3,3,3)
  233. mesh = Instance.new("SpecialMesh",block) mesh.MeshId = "rbxassetid://1089565562" mesh.TextureId = "rbxassetid://1089562101"
  234. blocks = {}
  235. for _=1,math.random(100,150) do
  236. local part = block:Clone()
  237. part.CFrame = CFrame.new(math.random(-102400,102400)/100,11,math.random(-102400,102400)/100)
  238. part.Parent = game.Workspace
  239. table.insert(blocks,part)
  240. end
  241.  
  242.  
  243. coin = Instance.new("Part") coin.Anchored = true coin.Size = Vector3.new(2,2,2) coin.CanCollide = false
  244. mesh = Instance.new("SpecialMesh",coin) mesh.MeshId = "rbxassetid://652133659" mesh.Scale = Vector3.new(0.005, 0.005, 0.005)
  245. coin.Color = Color3.fromRGB(255,245,0)
  246. coins = {}
  247. for _=1,math.random(300,350) do
  248. local part = coin:Clone()
  249. part.CFrame = CFrame.new(math.random(-102400,102400)/100,2,math.random(-102400,102400)/100)
  250. part.Parent = game.Workspace
  251. table.insert(coins,part)
  252. end
  253.  
  254. gui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui)
  255.  
  256. coinGui = Instance.new("TextLabel",gui) coinGui.BackgroundTransparency = 1 coinGui.TextScaled = true coinGui.Font = Enum.Font.Arcade coinGui.TextColor3 = Color3.fromRGB(255,255,255)
  257. coinGui.Size = UDim2.new(0.15,0,0.075,0)
  258.  
  259. mushroom = Instance.new("Part") mushroom.Anchored = false mushroom.Size = Vector3.new(2.5,2.5,2.5)
  260. mesh = Instance.new("SpecialMesh",mushroom) mesh.MeshId = "rbxassetid://843546054" mesh.TextureId = "rbxassetid://843546065" mesh.Scale = Vector3.new(0.05, 0.05, 0.05)
  261. mushrooms = {}
  262.  
  263. flower = Instance.new("Part") flower.Anchored = true flower.Size = Vector3.new(2.5,2.5,2.5)
  264. mesh = Instance.new("SpecialMesh",flower) mesh.MeshId = "rbxassetid://1091549739" mesh.TextureId = "rbxassetid://1091549771" mesh.Scale = Vector3.new(0.15, 0.15, 0.15)
  265. flowers = {}
  266.  
  267. star = Instance.new("Part") star.Anchored = false star.Size = Vector3.new(2.5,2.5,2.5) star.CanCollide = false
  268. mesh = Instance.new("SpecialMesh",star) mesh.MeshId = "rbxassetid://491129029" mesh.TextureId = "rbxassetid://1092055458" mesh.Scale = Vector3.new(0.075, 0.075, 0.075)
  269. stars = {}
  270.  
  271. fire = Instance.new("Part") fire.Anchored = false flower.Size = Vector3.new(1.5,1.5,1.5) fire.Transparency = 1
  272. meshhh = Instance.new("BillboardGui",fire) meshhh.LightInfluence = 0 meshhh.Size = UDim2.new(1.5,0,1.5,0)
  273. imagee = Instance.new("ImageLabel",meshhh) imagee.BackgroundTransparency = 1 imagee.Size = UDim2.new(1,0,1,0) imagee.Image = "rbxassetid://1091847477"
  274.  
  275. fires = {}
  276.  
  277.  
  278.  
  279.  
  280.  
  281. CoinsVal = 0
  282.  
  283.  
  284. --Animation Functions
  285.  
  286. walking = false
  287. stopped = true
  288.  
  289. jumping = false
  290. function walk()
  291. if lifes > 1 then
  292. walking = true
  293. for i=1,1 do
  294. wait(0.1)
  295.  
  296. if stopped == false and jumping == false then
  297. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  298. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  299. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(60))
  300. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(-60))
  301.  
  302. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(30))
  303. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(-30))
  304. else
  305. break
  306. end
  307.  
  308. wait(0.1)
  309. if stopped == false and jumping == false then
  310. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  311. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  312.  
  313. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(60))
  314. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(-60))
  315.  
  316. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(-30))
  317. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(30))
  318. else
  319. break
  320. end
  321. end
  322. walking = false
  323. else
  324. walking = true
  325. for i=1,1 do
  326. wait(0.1)
  327.  
  328. if stopped == false and jumping == false then
  329. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  330. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  331. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.15,0.4,0)*CFrame.Angles(0,math.rad(90),math.rad(60))
  332. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.15,0.4,0)*CFrame.Angles(0,math.rad(90),math.rad(-60))
  333.  
  334. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,-0.1,0.25)*CFrame.Angles(0,math.rad(90),math.rad(30))
  335. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0.26,-0.1,-0.25)*CFrame.Angles(0,math.rad(90),math.rad(-30))
  336. else
  337. break
  338. end
  339.  
  340. wait(0.1)
  341. if stopped == false and jumping == false then
  342. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  343. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  344.  
  345. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.15,0.4,0)*CFrame.Angles(0,math.rad(90),math.rad(60))
  346. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.15,0.4,0)*CFrame.Angles(0,math.rad(90),math.rad(-60))
  347.  
  348. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,-0.1,-0.25)*CFrame.Angles(0,math.rad(90),math.rad(-30))
  349. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0.26,-0.1,0.25)*CFrame.Angles(0,math.rad(90),math.rad(30))
  350. else
  351. break
  352. end
  353. end
  354. walking = false
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362. end
  363.  
  364.  
  365. end
  366.  
  367. function walkStop()
  368. if lifes > 1 then
  369. for i=1,1 do
  370. if jumping == false and stopped == true and walking == false then
  371. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.5,0.5,0)*CFrame.Angles(0,0,math.rad(-90))
  372. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,1,-0.5)*CFrame.Angles(math.rad(90),0,math.rad(-30))
  373.  
  374. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  375. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,0,-0.5)*CFrame.Angles(0,math.rad(90),math.rad(0))
  376.  
  377. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-250))
  378. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-120))
  379. else
  380. break
  381. end
  382. wait(0.25)
  383. if jumping == false and stopped == true and walking == false then
  384.  
  385. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
  386. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),0)
  387.  
  388. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  389. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  390.  
  391. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  392. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  393. else
  394. break
  395. end
  396. end
  397. else
  398.  
  399. for i=1,1 do
  400.  
  401.  
  402. if jumping == false and stopped == true and walking == false then
  403.  
  404. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-0.4,0.25,-0.75)*CFrame.Angles(0,0,math.rad(-90))
  405. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.5,0.75,-0.1)*CFrame.Angles(math.rad(90),0,math.rad(-30))
  406.  
  407. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  408. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0.26,0.5,-0.5)*CFrame.Angles(0,math.rad(90),math.rad(0))
  409.  
  410. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-250))
  411. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-120))
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418. else
  419. break
  420. end
  421. wait(0.25)
  422. if jumping == false and stopped == true and walking == false then
  423.  
  424.  
  425. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
  426. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
  427.  
  428. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  429. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0.26,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  430.  
  431. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  432. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  433. else
  434. break
  435. end
  436.  
  437. end
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451. end
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474. end
  475.  
  476. function jump()
  477. if lifes > 1 then
  478. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(-30))
  479. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(150))
  480.  
  481. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,0,-0.5)*CFrame.Angles(0,math.rad(90),math.rad(0))
  482. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  483.  
  484. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  485. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  486. else
  487. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(-30))
  488. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(150))
  489.  
  490. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  491. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0.26,0.5,-0.5)*CFrame.Angles(0,math.rad(90),math.rad(0))
  492.  
  493. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  494. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  495. end
  496. end
  497.  
  498. function land()
  499. if lifes > 1 then
  500. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
  501. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),0)
  502.  
  503. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  504. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  505.  
  506. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  507. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  508. else
  509. game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
  510. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
  511.  
  512. game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  513. game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0.26,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  514.  
  515. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  516. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
  517. end
  518. end
  519.  
  520. growing = false
  521.  
  522.  
  523. function degrow()
  524.  
  525. for i=1,5 do
  526. local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  527. local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  528. local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  529. local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  530. local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  531. local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  532.  
  533. game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size/2
  534. game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size/2
  535. game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size/2
  536. game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size/2
  537. game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size/2
  538. game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size/2
  539.  
  540. rs.Parent = game.Players.LocalPlayer.Character.Torso
  541. ls.Parent = game.Players.LocalPlayer.Character.Torso
  542. rh.Parent = game.Players.LocalPlayer.Character.Torso
  543. lh.Parent = game.Players.LocalPlayer.Character.Torso
  544. n.Parent = game.Players.LocalPlayer.Character.Torso
  545. rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  546. wait(.1)
  547. local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  548. local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  549. local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  550. local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  551. local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  552. local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  553.  
  554. game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size*2
  555. game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size*2
  556. game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size*2
  557. game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size*2
  558. game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size*2
  559. game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size*2
  560.  
  561. rs.Parent = game.Players.LocalPlayer.Character.Torso
  562. ls.Parent = game.Players.LocalPlayer.Character.Torso
  563. rh.Parent = game.Players.LocalPlayer.Character.Torso
  564. lh.Parent = game.Players.LocalPlayer.Character.Torso
  565. n.Parent = game.Players.LocalPlayer.Character.Torso
  566. rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  567. wait(.1)
  568. end
  569. local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  570. local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  571. local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  572. local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  573. local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  574. local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  575.  
  576. game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size/2
  577. game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size/2
  578. game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size/2
  579. game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size/2
  580. game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size/2
  581. game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size/2
  582.  
  583. rs.Parent = game.Players.LocalPlayer.Character.Torso
  584. ls.Parent = game.Players.LocalPlayer.Character.Torso
  585. rh.Parent = game.Players.LocalPlayer.Character.Torso
  586. lh.Parent = game.Players.LocalPlayer.Character.Torso
  587. n.Parent = game.Players.LocalPlayer.Character.Torso
  588. rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  589.  
  590. end
  591. function grow()
  592.  
  593. for i=1,5 do
  594.  
  595. local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  596. local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  597. local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  598. local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  599. local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  600. local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  601.  
  602. game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size*2
  603. game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size*2
  604. game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size*2
  605. game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size*2
  606. game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size*2
  607. game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size*2
  608.  
  609. rs.Parent = game.Players.LocalPlayer.Character.Torso
  610. ls.Parent = game.Players.LocalPlayer.Character.Torso
  611. rh.Parent = game.Players.LocalPlayer.Character.Torso
  612. lh.Parent = game.Players.LocalPlayer.Character.Torso
  613. n.Parent = game.Players.LocalPlayer.Character.Torso
  614. rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  615. wait(.1)
  616. local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  617. local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  618. local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  619. local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  620. local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  621. local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  622.  
  623. game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size/2
  624. game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size/2
  625. game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size/2
  626. game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size/2
  627. game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size/2
  628. game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size/2
  629.  
  630. rs.Parent = game.Players.LocalPlayer.Character.Torso
  631. ls.Parent = game.Players.LocalPlayer.Character.Torso
  632. rh.Parent = game.Players.LocalPlayer.Character.Torso
  633. lh.Parent = game.Players.LocalPlayer.Character.Torso
  634. n.Parent = game.Players.LocalPlayer.Character.Torso
  635. rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  636. wait(.1)
  637. end
  638.  
  639. local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  640. local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  641. local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  642. local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  643. local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  644. local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  645.  
  646. game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size*2
  647. game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size*2
  648. game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size*2
  649. game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size*2
  650. game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size*2
  651. game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size*2
  652.  
  653. rs.Parent = game.Players.LocalPlayer.Character.Torso
  654. ls.Parent = game.Players.LocalPlayer.Character.Torso
  655. rh.Parent = game.Players.LocalPlayer.Character.Torso
  656. lh.Parent = game.Players.LocalPlayer.Character.Torso
  657. n.Parent = game.Players.LocalPlayer.Character.Torso
  658.  
  659. rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  660.  
  661. end
  662.  
  663. function firegrow()
  664.  
  665.  
  666. for i=1,5 do
  667. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821700"
  668. pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821953"
  669. game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "http://www.roblox.com/asset/?id=1091724768"
  670. wait(.1)
  671. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821325"
  672. pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821538"
  673. game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "rbxassetid://494265293"
  674. wait(.1)
  675. end
  676. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821700"
  677. pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821953"
  678. game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "http://www.roblox.com/asset/?id=1091724768"
  679.  
  680. end
  681. function defiregrow()
  682.  
  683.  
  684. for i=1,5 do
  685. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821325"
  686. pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821538"
  687. game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "rbxassetid://494265293"
  688. wait(.1)
  689.  
  690. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821700"
  691. pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821953"
  692. game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "http://www.roblox.com/asset/?id=1091724768"
  693. wait(.1)
  694. end
  695. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821325"
  696. pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821538"
  697. game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "rbxassetid://494265293"
  698.  
  699. end
  700.  
  701. function fireThrow()
  702.  
  703.  
  704. local soundos = sound:Clone()
  705. soundos.SoundId = "rbxassetid://182755400"
  706. soundos.Parent = game.Players.LocalPlayer.Character.Torso
  707. soundos:Play()
  708. game:GetService("Debris"):AddItem(soundos,2)
  709. local fie = fire:Clone()
  710. fie.CanCollide = false
  711. fie.CFrame = CFrame.new(game.Players.LocalPlayer.Character["Right Arm"].Position,game.Players.LocalPlayer.Character["Right Arm"].Position+game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector*3)
  712. fie.Parent = game.Workspace
  713. table.insert(fires,fie)
  714. fie.Velocity = fie.CFrame.lookVector*30
  715. game:GetService("Debris"):AddItem(fie,3)
  716. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(90))
  717. wait(.1)
  718. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
  719.  
  720.  
  721.  
  722.  
  723. end
  724.  
  725.  
  726. --Main
  727. game.Players.LocalPlayer.Character["Right Leg"].Touched:connect(function(hit)
  728. if hit.Parent then
  729. if hit.Parent ~= game.Players.LocalPlayer.Character then
  730.  
  731. if hit.Parent:FindFirstChild("Humanoid") then
  732. if hit.Parent.Humanoid.Health > 0 then
  733. hit.Parent.Humanoid.Health = 0
  734. hit.CanCollide = true
  735. hit.Size = Vector3.new(hit.Size.X,0.05,hit.Size.Z)
  736. game.Players.LocalPlayer.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
  737. local sond = sound:Clone()
  738. sond.SoundId = "rbxassetid://140439666"
  739. sond.Parent = game.Players.LocalPlayer.Character.Torso
  740. sond:Play()
  741. game:GetService("Debris"):AddItem(sond,2)
  742. end
  743. end
  744. end
  745. end
  746. end)
  747. game.Players.LocalPlayer.Character.Head.Touched:connect(function(part)
  748. local did = false
  749. local num = 0
  750. for number,part2 in pairs(bricks) do
  751. if part2 == part then
  752. did = true
  753. num = number
  754. end
  755. end
  756. if did == true then
  757.  
  758. part:remove()
  759.  
  760. local coinSound = sound:Clone()
  761. coinSound.SoundId = "rbxassetid://317619936"
  762. coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  763. coinSound:Play()
  764. game:GetService("Debris"):AddItem(coinSound,3)
  765. table.remove(bricks,num)
  766.  
  767. end
  768.  
  769. local did = false
  770. local num = 0
  771. for number,part2 in pairs(blocks) do
  772. if part2 == part then
  773. did = true
  774. num = number
  775. end
  776. end
  777. if did == true then
  778.  
  779. part.Mesh.MeshId = "rbxassetid://1089569418"
  780. part.Mesh.TextureId = "rbxassetid://1089568636"
  781.  
  782. local coinSound = sound:Clone()
  783. coinSound.SoundId = "rbxassetid://317619936"
  784. coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  785. coinSound:Play()
  786. game:GetService("Debris"):AddItem(coinSound,3)
  787. table.remove(blocks,num)
  788. local get = math.random(1,2)
  789. if get == 1 then
  790. local coinHolo = coin:Clone()
  791. coinHolo.Parent = part
  792. coinHolo.CFrame = part.CFrame
  793. CoinsVal = CoinsVal+10
  794. local coinSound = sound:Clone()
  795. coinSound.SoundId = "rbxassetid://138702491"
  796. coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  797. coinSound:Play()
  798. game:GetService("Debris"):AddItem(coinSound,3)
  799.  
  800. for i=1,10 do
  801. wait()
  802. coinHolo.CFrame = coinHolo.CFrame+Vector3.new(0,0.25,0)
  803. end
  804. wait(1)
  805. coinHolo:remove()
  806. end
  807. if get == 2 then
  808. local chance = math.random(1,3)
  809.  
  810. if chance > 1 then
  811. if lifes > 1 then
  812. local flow = flower:Clone()
  813. flow.Parent = game.Workspace
  814. flow.CFrame = part.CFrame
  815. table.insert(flowers,flow)
  816. for i=1,10 do
  817. wait()
  818. flow.CFrame = flow.CFrame+Vector3.new(0,0.25,0)
  819. end
  820.  
  821. end
  822. if lifes == 1 then
  823. local mush = mushroom:Clone()
  824. mush.CFrame = part.CFrame+Vector3.new(0,2,0)
  825. mush.Parent = game.Workspace
  826.  
  827. table.insert(mushrooms,mush)
  828. end
  829. end
  830. if chance == 1 then
  831. local sta = star:Clone()
  832. sta.CFrame = part.CFrame+Vector3.new(0,2,0)
  833. sta.Parent = game.Workspace
  834.  
  835. table.insert(stars,sta)
  836. end
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844. end
  845. end
  846.  
  847.  
  848. end)
  849. starA = false
  850. cooldown = false
  851. colorz = 0
  852. starTimer = 0
  853. game:GetService("UserInputService").InputBegan:connect(function(key)
  854. if key.KeyCode == Enum.KeyCode.C then
  855. if color then
  856. color.Enabled = not color.Enabled
  857. end
  858. end
  859. if key.KeyCode == Enum.KeyCode.Z then
  860. if lifes > 1 then
  861. local flow = flower:Clone()
  862. flow.Parent = game.Workspace
  863. flow.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  864. table.insert(flowers,flow)
  865.  
  866. end
  867. if lifes == 1 then
  868. local mush = mushroom:Clone()
  869. mush.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  870. mush.Parent = game.Workspace
  871.  
  872. table.insert(mushrooms,mush)
  873. end
  874. end
  875. if key.KeyCode == Enum.KeyCode.X then
  876.  
  877.  
  878. local sta = star:Clone()
  879. sta.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  880. sta.Parent = game.Workspace
  881.  
  882. table.insert(stars,sta)
  883.  
  884. end
  885.  
  886. if key.KeyCode == Enum.KeyCode.E then
  887. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 50
  888. if lifes == 3 then
  889. if cooldown == false then
  890. cooldown = true
  891. fireThrow()
  892. cooldown = false
  893. end
  894. end
  895.  
  896.  
  897. end
  898. end)
  899. game:GetService("UserInputService").InputEnded:connect(function(key)
  900. if key.KeyCode == Enum.KeyCode.E then
  901. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25
  902. end
  903. end)
  904. game:GetService("RunService").RenderStepped:connect(function()
  905.  
  906. starTimer = starTimer+1
  907. if starTimer > 1 then
  908. starTimer = 0
  909. colorz = colorz+1
  910. if colorz > 5 then
  911. colorz = 0
  912. end
  913. if starA == true then
  914. for _,part in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  915. if part:IsA("BasePart") then
  916. if part.Name == "HumanoidRootPart" then
  917. for _,child in pairs(game.Workspace:GetChildren()) do
  918. if child ~= game.Players.LocalPlayer.Character then
  919. if child:FindFirstChild("Humanoid") then
  920. for _,parto in pairs(child:GetChildren()) do
  921. if parto:IsA("BasePart") then
  922. if (parto.Position-part.Position).magnitude <= 5 then
  923. parto:remove()
  924. end
  925. end
  926. end
  927. end
  928. end
  929. end
  930. end
  931.  
  932.  
  933. local clon = part:Clone()
  934. for _,child in pairs(clon:GetChildren()) do
  935. if child.ClassName ~= "SpecialMesh" then
  936. child:remove()
  937. else
  938. child.TextureId = ""
  939. end
  940. end
  941. clon.Anchored = true
  942. if colorz == 0 then
  943. clon.Color = Color3.fromRGB(255,0,0)
  944. end
  945. if colorz == 1 then
  946. clon.Color = Color3.fromRGB(255,255,0)
  947. end
  948. if colorz == 2 then
  949. clon.Color = Color3.fromRGB(0,255,0)
  950. end
  951. if colorz == 3 then
  952. clon.Color = Color3.fromRGB(0,255,255)
  953. end
  954. if colorz == 4 then
  955. clon.Color = Color3.fromRGB(0,0,255)
  956. end
  957. if colorz == 5 then
  958. clon.Color = Color3.fromRGB(255,0,255)
  959. end
  960. game:GetService("Debris"):AddItem(clon,0.5)
  961. clon.Transparency = 0
  962. clon.Anchored = true
  963. clon.CanCollide = false
  964. clon.Material = Enum.Material.SmoothPlastic
  965. clon.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  966. clon.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  967. clon.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  968. clon.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  969. clon.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  970. clon.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  971.  
  972.  
  973.  
  974.  
  975. clon.Parent = game.Workspace
  976. end
  977.  
  978.  
  979. end
  980.  
  981.  
  982.  
  983.  
  984.  
  985. end
  986. end
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995. coinGui.Text = "Total Score: "..CoinsVal
  996. for number,part in pairs(fires) do
  997. if part == nil or not part:FindFirstChild("BillboardGui") then
  998. part:remove()
  999. table.remove(fires,number)
  1000. break
  1001. end
  1002.  
  1003. part.BillboardGui.ImageLabel.Rotation = part.BillboardGui.ImageLabel.Rotation+7.5
  1004. part.Touched:connect(function(hit)
  1005. if hit.Parent ~= game.Players.LocalPlayer.Character then
  1006. if hit.Parent:FindFirstChild("Humanoid") then
  1007. hit.Parent.Humanoid.Health = 0
  1008. part:remove()
  1009. end
  1010. end
  1011. part.Velocity = part.CFrame.lookVector*30 +Vector3.new(0,50,0)
  1012. end)
  1013.  
  1014. end
  1015. for number,part in pairs(stars) do
  1016. if part == nil then
  1017. part:remove()
  1018. table.remove(stars,number)
  1019. break
  1020. end
  1021.  
  1022. part.Touched:connect(function(hit)
  1023. part.Velocity = part.CFrame.lookVector*20 +Vector3.new(0,70,0)
  1024. end)
  1025.  
  1026. end
  1027. for number,part in pairs(coins) do
  1028. if takeCooldown == false then
  1029. if (part.Position-game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude <= 3 then
  1030. part:remove()
  1031. takeCooldown = true
  1032. CoinsVal = CoinsVal+10
  1033. local coinSound = sound:Clone()
  1034. coinSound.SoundId = "rbxassetid://138702491"
  1035. coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  1036. coinSound:Play()
  1037. game:GetService("Debris"):AddItem(coinSound,3)
  1038. table.remove(coins,number)
  1039. wait()
  1040. takeCooldown = false
  1041. end
  1042. end
  1043. end
  1044. for number,part in pairs(mushrooms) do
  1045. if takeCooldown == false then
  1046. if (part.Position-game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude <= 3 then
  1047. part:remove()
  1048. takeCooldown = true
  1049.  
  1050. local coinSound = sound:Clone()
  1051. coinSound.Volume = 0.07
  1052. coinSound.SoundId = "rbxassetid://162456532"
  1053. coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  1054. coinSound:Play()
  1055. game:GetService("Debris"):AddItem(coinSound,3)
  1056. table.remove(mushrooms,number)
  1057. if lifes == 2 and lastLife == 2 then
  1058. CoinsVal = CoinsVal+20
  1059. end
  1060. if lifes == 1 then
  1061. lifes = 2
  1062. end
  1063. if lifes == 2 and lastLife == 1 then
  1064. growing = true
  1065. grow()
  1066. growing = false
  1067. end
  1068. lastLife = lifes
  1069. wait(.1)
  1070. takeCooldown = false
  1071. end
  1072. end
  1073. end
  1074. for number,part in pairs(stars) do
  1075. if takeCooldown == false then
  1076. if (part.Position-game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude <= 4 then
  1077. part:remove()
  1078. if starA == false then
  1079. takeCooldown = true
  1080.  
  1081. local coinSound = sound:Clone()
  1082.  
  1083. coinSound.SoundId = "rbxassetid://162456532"
  1084. coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  1085. coinSound:Play()
  1086. game:GetService("Debris"):AddItem(coinSound,3)
  1087. levelMusic:Stop()
  1088. wait(0.5)
  1089. local starSound = sound:Clone()
  1090.  
  1091. starSound.SoundId = "rbxassetid://1058165596"
  1092. starSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  1093. starSound:Play()
  1094.  
  1095. starA = true
  1096. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge
  1097. game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
  1098. for _,part in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  1099. if part:IsA("BasePart") then
  1100. part.Transparency = 1
  1101. end
  1102. end
  1103.  
  1104. game.Players.LocalPlayer.Character.Parent = game.Workspace.CurrentCamera
  1105.  
  1106.  
  1107.  
  1108.  
  1109. table.remove(stars,number)
  1110.  
  1111. wait(.1)
  1112. takeCooldown = false
  1113.  
  1114. wait(15)
  1115. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = 1
  1116. game.Players.LocalPlayer.Character.Humanoid.Health = 1
  1117. for _,part in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  1118. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  1119. part.Transparency = 0
  1120. end
  1121. end
  1122. levelMusic:Play()
  1123. game.Players.LocalPlayer.Character.Parent = game.Workspace
  1124.  
  1125. starA = false
  1126. starSound:remove()
  1127. end
  1128. end
  1129. end
  1130. end
  1131.  
  1132.  
  1133.  
  1134.  
  1135. for number,part in pairs(flowers) do
  1136. if takeCooldown == false then
  1137. if (part.Position-game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude <= 3 then
  1138. part:remove()
  1139. takeCooldown = true
  1140.  
  1141. local coinSound = sound:Clone()
  1142. coinSound.Volume = 0.07
  1143. coinSound.SoundId = "rbxassetid://162456532"
  1144. coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  1145. coinSound:Play()
  1146. game:GetService("Debris"):AddItem(coinSound,3)
  1147. table.remove(flowers,number)
  1148. if lifes == 3 and lastLife == 3 then
  1149. CoinsVal = CoinsVal+30
  1150. end
  1151. if lifes == 1 then
  1152. growing = true
  1153. grow()
  1154. growing = false
  1155. lifes = 2
  1156. end
  1157. if lifes == 2 then
  1158. growing = true
  1159. firegrow()
  1160. growing = false
  1161. end
  1162. lifes = 3
  1163.  
  1164. wait(.1)
  1165. takeCooldown = false
  1166.  
  1167. lastLife = lifes
  1168.  
  1169. end
  1170. end
  1171. end
  1172.  
  1173. for _,part in pairs(coins) do
  1174. part.CFrame = part.CFrame*CFrame.Angles(0,0.05,0)
  1175. end
  1176.  
  1177. for namba,mush in pairs(mushrooms) do
  1178. if mush == nil then
  1179. table.remove(mushrooms,namba)
  1180. end
  1181. mush.CFrame = (CFrame.new(mush.CFrame.p,Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X,mush.Position.Y,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z))-Vector3.new(0,0.1,0))*CFrame.Angles(0,math.rad(180),0)
  1182.  
  1183. mush.Velocity = mush.CFrame.lookVector*5
  1184. end
  1185. for namba,flowo in pairs(flowers) do
  1186. if flowo == nil then
  1187. table.remove(flowers,namba)
  1188. end
  1189. end
  1190. if game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity.Magnitude <= 1 then
  1191.  
  1192. if stopped == false and jumping == false then
  1193. stopped = true
  1194. walking = false
  1195. walkStop()
  1196. end
  1197. end
  1198. if game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity.Magnitude > 1 then
  1199. if walking == false and jumping == false then
  1200. stopped = false
  1201.  
  1202. walk()
  1203. end
  1204. end
  1205. end)
  1206. game.Players.LocalPlayer.Character.Humanoid.StateChanged:connect(function(old,new)
  1207. if new == Enum.HumanoidStateType.Jumping or new == Enum.HumanoidStateType.Freefall then
  1208. jump()
  1209.  
  1210. jumping = true
  1211. end
  1212. if new == Enum.HumanoidStateType.Landed then
  1213. land()
  1214. wait(.05)
  1215. jumping = false
  1216. end
  1217. end)
  1218.  
  1219. game.Players.LocalPlayer.Character.Humanoid.HealthChanged:connect(function(newhealth)
  1220. if starA == false then
  1221. if 1 > newhealth then
  1222. if growing == false then
  1223.  
  1224. lifes = lifes-1
  1225.  
  1226. if lifes > 0 then
  1227. game.Players.LocalPlayer.Character.Humanoid.Health = 1
  1228. else
  1229.  
  1230. for _,child in pairs(game.Workspace:GetChildren()) do
  1231. if child:IsA("BasePart") then
  1232. if child.Name ~= "Baseplate" and child.Name ~= "Terrain" then
  1233. child:remove()
  1234. end
  1235. end
  1236. end
  1237. if game.Workspace:FindFirstChild("Baseplate") then
  1238. game.Workspace.Baseplate.Transparency = 1
  1239. GroundTexture:remove()
  1240. end
  1241. levelMusic:remove()
  1242. local gameover =sound:Clone()
  1243. gameover.SoundId = "rbxassetid://187102994"
  1244. gameover.Parent = game.Players.LocalPlayer.Character
  1245. gameover:Play()
  1246. color.Saturation = -1
  1247. color.Contrast = 5
  1248.  
  1249. sky.SkyboxBk = "http://www.roblox.com/asset/?id=1091341380"
  1250. sky.SkyboxFt = "http://www.roblox.com/asset/?id=1091341380"
  1251. sky.SkyboxLf = "http://www.roblox.com/asset/?id=1091341380"
  1252. sky.SkyboxRt = "http://www.roblox.com/asset/?id=1091341380"
  1253. sky.SkyboxUp = "http://www.roblox.com/asset/?id=1091341494"
  1254. sky.SkyboxDn = "http://www.roblox.com/asset/?id=1091341494"
  1255.  
  1256.  
  1257. sky.SunAngularSize = 0
  1258. sky.MoonAngularSize = 0
  1259.  
  1260.  
  1261. wait(4)
  1262. if game.Workspace:FindFirstChild("Baseplate") then
  1263. game.Workspace.Baseplate.Transparency = 0
  1264. end
  1265. gameover:remove()
  1266. color:remove()
  1267. sky:remove()
  1268.  
  1269. end
  1270.  
  1271.  
  1272. if lifes == 1 then
  1273. growing = true
  1274. degrow()
  1275. growing = false
  1276. end
  1277. if lifes == 2 then
  1278. growing = true
  1279. defiregrow()
  1280. growing = false
  1281. end
  1282.  
  1283.  
  1284. else
  1285. game.Players.LocalPlayer.Character.Humanoid.Health = 1
  1286. end
  1287. end
  1288. end
  1289. if starA == true then
  1290. game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
  1291. end
  1292. lastLife = lifes
  1293. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement