Hmm465_Gaming

mario script

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