Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- --Script made by Pedrorb03. Enjoy it ;)
- --Set Up
- game.Players.LocalPlayer.Character.Humanoid.MaxHealth = 1
- game.Players.LocalPlayer.Character.Humanoid.Health = 1
- for _,anim in pairs(game.Players.LocalPlayer.Character.Humanoid:GetPlayingAnimationTracks()) do
- anim:Stop()
- end
- game.Players.LocalPlayer.Character.Animate:remove()
- for _,part in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if part.ClassName == "Body Colors" or part.ClassName == "Accessory" or part.ClassName == "Pants" or part.ClassName == "Shirt" or part.ClassName == "Shirt Graphic" then
- part:remove()
- end
- end
- for _,part in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if part:IsA("BasePart") then
- part.BrickColor = BrickColor.new("Pastel brown")
- end
- end
- shirt = Instance.new("Shirt",game.Players.LocalPlayer.Character) shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821325"
- pants = Instance.new("Pants",game.Players.LocalPlayer.Character) pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821538"
- game.Players.LocalPlayer.Character.Head.Mesh.Scale = Vector3.new(0.45,0.45,0.45)
- game.Players.LocalPlayer.Character.Head.Mesh.Offset = Vector3.new(0,0.3,-0.1)
- game.Players.LocalPlayer.Character.Head.face:remove()
- game.Players.LocalPlayer.Character.Head.Mesh.MeshId = "rbxassetid://494265290"
- game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "rbxassetid://494265293"
- game.Players.LocalPlayer.Character.Head.Jumping.SoundId = "rbxassetid://158309736"
- sound = nil
- while sound == nil do
- wait()
- sound = Instance.new("Sound")
- if sound ~= nil then
- break
- end
- end
- levelMusic = sound:Clone()
- levelMusic.SoundId = "rbxassetid://232553386"
- levelMusic.Looped = true
- levelMusic.Parent = game.Players.LocalPlayer.Character
- levelMusic.Volume = 0.3
- levelMusic:Play()
- takeCooldown = false
- lifes = 2
- lastLife = lifes
- game.Players.LocalPlayer.Character.Humanoid.JumpPower = 65
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25
- --Animation Functions
- walking = false
- stopped = true
- jumping = false
- function walk()
- if lifes > 1 then
- walking = true
- for i=1,1 do
- wait(0.1)
- if stopped == false and jumping == false then
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(60))
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(-60))
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(30))
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(-30))
- else
- break
- end
- wait(0.1)
- if stopped == false and jumping == false then
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(60))
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(-60))
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(-30))
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(30))
- else
- break
- end
- end
- walking = false
- else
- walking = true
- for i=1,1 do
- wait(0.1)
- if stopped == false and jumping == false then
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.15,0.4,0)*CFrame.Angles(0,math.rad(90),math.rad(60))
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.15,0.4,0)*CFrame.Angles(0,math.rad(90),math.rad(-60))
- 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))
- 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))
- else
- break
- end
- wait(0.1)
- if stopped == false and jumping == false then
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.15,0.4,0)*CFrame.Angles(0,math.rad(90),math.rad(60))
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.15,0.4,0)*CFrame.Angles(0,math.rad(90),math.rad(-60))
- 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))
- 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))
- else
- break
- end
- end
- walking = false
- end
- end
- function walkStop()
- if lifes > 1 then
- for i=1,1 do
- if jumping == false and stopped == true and walking == false then
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.5,0.5,0)*CFrame.Angles(0,0,math.rad(-90))
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,1,-0.5)*CFrame.Angles(math.rad(90),0,math.rad(-30))
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,0,-0.5)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-250))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-120))
- else
- break
- end
- wait(0.25)
- if jumping == false and stopped == true and walking == false then
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),0)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- else
- break
- end
- end
- else
- for i=1,1 do
- if jumping == false and stopped == true and walking == false then
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-0.4,0.25,-0.75)*CFrame.Angles(0,0,math.rad(-90))
- 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))
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- 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))
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-250))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-120))
- else
- break
- end
- wait(0.25)
- if jumping == false and stopped == true and walking == false then
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0.26,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- else
- break
- end
- end
- end
- end
- function jump()
- if lifes > 1 then
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(-30))
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(150))
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,0,-0.5)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- else
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(-30))
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.2,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(150))
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- 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))
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- end
- end
- function land()
- if lifes > 1 then
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),0)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- else
- game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1.2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(0.2,0.5,0)*CFrame.Angles(0,math.rad(90),0)
- game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(0.74,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(0.26,0,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),0,math.rad(-180))
- end
- end
- growing = false
- function degrow()
- for i=1,5 do
- local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
- local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
- local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
- local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
- local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
- local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
- game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size/2
- game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size/2
- game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size/2
- game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size/2
- game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size/2
- game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size/2
- rs.Parent = game.Players.LocalPlayer.Character.Torso
- ls.Parent = game.Players.LocalPlayer.Character.Torso
- rh.Parent = game.Players.LocalPlayer.Character.Torso
- lh.Parent = game.Players.LocalPlayer.Character.Torso
- n.Parent = game.Players.LocalPlayer.Character.Torso
- rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- wait(.1)
- local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
- local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
- local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
- local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
- local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
- local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
- game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size*2
- game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size*2
- game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size*2
- game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size*2
- game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size*2
- game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size*2
- rs.Parent = game.Players.LocalPlayer.Character.Torso
- ls.Parent = game.Players.LocalPlayer.Character.Torso
- rh.Parent = game.Players.LocalPlayer.Character.Torso
- lh.Parent = game.Players.LocalPlayer.Character.Torso
- n.Parent = game.Players.LocalPlayer.Character.Torso
- rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- wait(.1)
- end
- local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
- local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
- local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
- local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
- local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
- local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
- game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size/2
- game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size/2
- game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size/2
- game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size/2
- game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size/2
- game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size/2
- rs.Parent = game.Players.LocalPlayer.Character.Torso
- ls.Parent = game.Players.LocalPlayer.Character.Torso
- rh.Parent = game.Players.LocalPlayer.Character.Torso
- lh.Parent = game.Players.LocalPlayer.Character.Torso
- n.Parent = game.Players.LocalPlayer.Character.Torso
- rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- end
- function grow()
- for i=1,5 do
- local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
- local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
- local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
- local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
- local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
- local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
- game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size*2
- game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size*2
- game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size*2
- game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size*2
- game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size*2
- game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size*2
- rs.Parent = game.Players.LocalPlayer.Character.Torso
- ls.Parent = game.Players.LocalPlayer.Character.Torso
- rh.Parent = game.Players.LocalPlayer.Character.Torso
- lh.Parent = game.Players.LocalPlayer.Character.Torso
- n.Parent = game.Players.LocalPlayer.Character.Torso
- rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- wait(.1)
- local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
- local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
- local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
- local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
- local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
- local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
- game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size/2
- game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size/2
- game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size/2
- game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size/2
- game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size/2
- game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size/2
- rs.Parent = game.Players.LocalPlayer.Character.Torso
- ls.Parent = game.Players.LocalPlayer.Character.Torso
- rh.Parent = game.Players.LocalPlayer.Character.Torso
- lh.Parent = game.Players.LocalPlayer.Character.Torso
- n.Parent = game.Players.LocalPlayer.Character.Torso
- rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- wait(.1)
- end
- local rootJoint = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
- local rs = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
- local ls = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
- local rh = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
- local lh = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
- local n = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
- game.Players.LocalPlayer.Character.HumanoidRootPart.Size = game.Players.LocalPlayer.Character.HumanoidRootPart.Size*2
- game.Players.LocalPlayer.Character.Torso.Size = game.Players.LocalPlayer.Character.Torso.Size*2
- game.Players.LocalPlayer.Character["Right Arm"].Size = game.Players.LocalPlayer.Character["Right Arm"].Size*2
- game.Players.LocalPlayer.Character["Left Arm"].Size = game.Players.LocalPlayer.Character["Left Arm"].Size*2
- game.Players.LocalPlayer.Character["Right Leg"].Size = game.Players.LocalPlayer.Character["Right Leg"].Size*2
- game.Players.LocalPlayer.Character["Left Leg"].Size = game.Players.LocalPlayer.Character["Left Leg"].Size*2
- rs.Parent = game.Players.LocalPlayer.Character.Torso
- ls.Parent = game.Players.LocalPlayer.Character.Torso
- rh.Parent = game.Players.LocalPlayer.Character.Torso
- lh.Parent = game.Players.LocalPlayer.Character.Torso
- n.Parent = game.Players.LocalPlayer.Character.Torso
- rootJoint.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- end
- function firegrow()
- for i=1,5 do
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821700"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821953"
- game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "http://www.roblox.com/asset/?id=1091724768"
- wait(.1)
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821325"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821538"
- game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "rbxassetid://494265293"
- wait(.1)
- end
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821700"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821953"
- game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "http://www.roblox.com/asset/?id=1091724768"
- end
- function defiregrow()
- for i=1,5 do
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821325"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821538"
- game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "rbxassetid://494265293"
- wait(.1)
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821700"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821953"
- game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "http://www.roblox.com/asset/?id=1091724768"
- wait(.1)
- end
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1091821325"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=1091821538"
- game.Players.LocalPlayer.Character.Head.Mesh.TextureId = "rbxassetid://494265293"
- end
- function fireThrow()
- local soundos = sound:Clone()
- soundos.SoundId = "rbxassetid://182755400"
- soundos.Parent = game.Players.LocalPlayer.Character.Torso
- soundos:Play()
- game:GetService("Debris"):AddItem(soundos,2)
- local fie = fire:Clone()
- fie.CanCollide = false
- 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)
- fie.Parent = game.Workspace
- table.insert(fires,fie)
- fie.Velocity = fie.CFrame.lookVector*30
- game:GetService("Debris"):AddItem(fie,3)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(90))
- wait(.1)
- game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),math.rad(0))
- end
- --Main
- game.Players.LocalPlayer.Character["Right Leg"].Touched:connect(function(hit)
- if hit.Parent then
- if hit.Parent ~= game.Players.LocalPlayer.Character then
- if hit.Parent:FindFirstChild("Humanoid") then
- if hit.Parent.Humanoid.Health > 0 then
- hit.Parent.Humanoid.Health = 0
- hit.CanCollide = true
- hit.Size = Vector3.new(hit.Size.X,0.05,hit.Size.Z)
- game.Players.LocalPlayer.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
- local sond = sound:Clone()
- sond.SoundId = "rbxassetid://140439666"
- sond.Parent = game.Players.LocalPlayer.Character.Torso
- sond:Play()
- game:GetService("Debris"):AddItem(sond,2)
- end
- end
- end
- end
- end)
- game.Players.LocalPlayer.Character.Head.Touched:connect(function(part)
- local did = false
- local num = 0
- for number,part2 in pairs(bricks) do
- if part2 == part then
- did = true
- num = number
- end
- end
- if did == true then
- part:remove()
- local coinSound = sound:Clone()
- coinSound.SoundId = "rbxassetid://317619936"
- coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- coinSound:Play()
- game:GetService("Debris"):AddItem(coinSound,3)
- table.remove(bricks,num)
- end
- local did = false
- local num = 0
- for number,part2 in pairs(blocks) do
- if part2 == part then
- did = true
- num = number
- end
- end
- if did == true then
- part.Mesh.MeshId = "rbxassetid://1089569418"
- part.Mesh.TextureId = "rbxassetid://1089568636"
- local coinSound = sound:Clone()
- coinSound.SoundId = "rbxassetid://317619936"
- coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- coinSound:Play()
- game:GetService("Debris"):AddItem(coinSound,3)
- table.remove(blocks,num)
- local get = math.random(1,2)
- if get == 1 then
- local coinHolo = coin:Clone()
- coinHolo.Parent = part
- coinHolo.CFrame = part.CFrame
- CoinsVal = CoinsVal+10
- local coinSound = sound:Clone()
- coinSound.SoundId = "rbxassetid://138702491"
- coinSound.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- coinSound:Play()
- game:GetService("Debris"):AddItem(coinSound,3)
- for i=1,10 do
- wait()
- coinHolo.CFrame = coinHolo.CFrame+Vector3.new(0,0.25,0)
- end
- wait(1)
- coinHolo:remove()
- end
- if get == 2 then
- local chance = math.random(1,3)
- if chance > 1 then
- if lifes > 1 then
- local flow = flower:Clone()
- flow.Parent = game.Workspace
- flow.CFrame = part.CFrame
- table.insert(flowers,flow)
- for i=1,10 do
- wait()
- flow.CFrame = flow.CFrame+Vector3.new(0,0.25,0)
- end
- end
- if lifes == 1 then
- local mush = mushroom:Clone()
- mush.CFrame = part.CFrame+Vector3.new(0,2,0)
- mush.Parent = game.Workspace
- table.insert(mushrooms,mush)
- end
- end
- if chance == 1 then
- local sta = star:Clone()
- sta.CFrame = part.CFrame+Vector3.new(0,2,0)
- sta.Parent = game.Workspace
- table.insert(stars,sta)
- end
- end
- end
- end)
- starA = false
- cooldown = false
- colorz = 0
- starTimer = 0
- game:GetService("UserInputService").InputBegan:connect(function(key)
- if key.KeyCode == Enum.KeyCode.C then
- if color then
- color.Enabled = not color.Enabled
- end
- end
- if key.KeyCode == Enum.KeyCode.Z then
- if lifes > 1 then
- local flow = flower:Clone()
- flow.Parent = game.Workspace
- flow.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- table.insert(flowers,flow)
- end
- if lifes == 1 then
- local mush = mushroom:Clone()
- mush.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- mush.Parent = game.Workspace
- table.insert(mushrooms,mush)
- end
- end
- if key.KeyCode == Enum.KeyCode.X then
- local sta = star:Clone()
- sta.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- sta.Parent = game.Workspace
- table.insert(stars,sta)
- end
- if key.KeyCode == Enum.KeyCode.E then
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 50
- if lifes == 3 then
- if cooldown == false then
- cooldown = true
- fireThrow()
- cooldown = false
- end
- end
- end
- end)
- game:GetService("UserInputService").InputEnded:connect(function(key)
- if key.KeyCode == Enum.KeyCode.E then
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25
- end
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- starTimer = starTimer+1
- if starTimer > 1 then
- starTimer = 0
- colorz = colorz+1
- if colorz > 5 then
- colorz = 0
- end
- if starA == true then
- for _,part in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if part:IsA("BasePart") then
- if part.Name == "HumanoidRootPart" then
- for _,child in pairs(game.Workspace:GetChildren()) do
- if child ~= game.Players.LocalPlayer.Character then
- if child:FindFirstChild("Humanoid") then
- for _,parto in pairs(child:GetChildren()) do
- if parto:IsA("BasePart") then
- if (parto.Position-part.Position).magnitude <= 5 then
- parto:remove()
- end
- end
- end
- end
- end
- end
- end
- local clon = part:Clone()
- for _,child in pairs(clon:GetChildren()) do
- if child.ClassName ~= "SpecialMesh" then
- child:remove()
- else
- child.TextureId = ""
- end
- end
- clon.Anchored = true
- if colorz == 0 then
- clon.Color = Color3.fromRGB(255,0,0)
- end
- if colorz == 1 then
- clon.Color = Color3.fromRGB(255,255,0)
- end
- if colorz == 2 then
- clon.Color = Color3.fromRGB(0,255,0)
- end
- if colorz == 3 then
- clon.Color = Color3.fromRGB(0,255,255)
- end
- if colorz == 4 then
- clon.Color = Color3.fromRGB(0,0,255)
- end
- if colorz == 5 then
- clon.Color = Color3.fromRGB(255,0,255)
- end
- game:GetService("Debris"):AddItem(clon,0.5)
- clon.Transparency = 0
- clon.Anchored = true
- clon.CanCollide = false
- clon.Material = Enum.Material.SmoothPlastic
- clon.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- clon.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- clon.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- clon.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- clon.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- clon.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- clon.Parent = game.Workspace
- end
- end
- end
- end
- end)
- game.Players.LocalPlayer.Character.Humanoid.StateChanged:connect(function(old,new)
- if new == Enum.HumanoidStateType.Jumping or new == Enum.HumanoidStateType.Freefall then
- jump()
- jumping = true
- end
- if new == Enum.HumanoidStateType.Landed then
- land()
- wait(.05)
- jumping = false
- end
- end)
- game.Players.LocalPlayer.Character.Humanoid.HealthChanged:connect(function(newhealth)
- if starA == false then
- if 1 > newhealth then
- if growing == false then
- lifes = lifes-1
- if lifes > 0 then
- game.Players.LocalPlayer.Character.Humanoid.Health = 1
- else
- for _,child in pairs(game.Workspace:GetChildren()) do
- if child:IsA("BasePart") then
- if child.Name ~= "Baseplate" and child.Name ~= "Terrain" then
- child:remove()
- end
- end
- end
- if game.Workspace:FindFirstChild("Baseplate") then
- game.Workspace.Baseplate.Transparency = 1
- GroundTexture:remove()
- end
- levelMusic:remove()
- local gameover =sound:Clone()
- gameover.SoundId = "rbxassetid://187102994"
- gameover.Parent = game.Players.LocalPlayer.Character
- gameover:Play()
- color.Saturation = -1
- color.Contrast = 5
- sky.SkyboxBk = "http://www.roblox.com/asset/?id=1091341380"
- sky.SkyboxFt = "http://www.roblox.com/asset/?id=1091341380"
- sky.SkyboxLf = "http://www.roblox.com/asset/?id=1091341380"
- sky.SkyboxRt = "http://www.roblox.com/asset/?id=1091341380"
- sky.SkyboxUp = "http://www.roblox.com/asset/?id=1091341494"
- sky.SkyboxDn = "http://www.roblox.com/asset/?id=1091341494"
- sky.SunAngularSize = 0
- sky.MoonAngularSize = 0
- wait(4)
- if game.Workspace:FindFirstChild("Baseplate") then
- game.Workspace.Baseplate.Transparency = 0
- end
- gameover:remove()
- color:remove()
- sky:remove()
- end
- if lifes == 1 then
- growing = true
- degrow()
- growing = false
- end
- if lifes == 2 then
- growing = true
- defiregrow()
- growing = false
- end
- else
- game.Players.LocalPlayer.Character.Humanoid.Health = 1
- end
- end
- end
- if starA == true then
- game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
- end
- lastLife = lifes
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement