Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- 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 te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- 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
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a 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})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) 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
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- ----- Script made by Pedrorb03 -----
- owner.Character.Head:WaitForChild("face")
- while owner.Character.Head.face.texture ~= "rbxassetid://1039774343" do
- wait()
- owner.Character.Head.face.Texture = "rbxassetid://1039774343"
- end
- for _,animate in pairs(owner.Character:GetChildren()) do
- if animate.Name == "Animate" then
- animate:remove()
- end
- if animate.ClassName == "Accessory" then
- animate:remove()
- end
- end
- for _,anim in pairs(owner.Character.Humanoid:GetPlayingAnimationTracks()) do
- anim:Stop()
- end
- rot = 0
- armrot = 0
- suck = nil
- power = 0
- movingup = false
- movingback = false
- popo = 0
- bodyforces = {}
- popos = {}
- for _,part in pairs(owner.Character:GetChildren()) do
- if part:IsA("BasePart") then
- local zerograv = Instance.new("BodyForce",part) zerograv.force = Vector3.new(0, game.Workspace.Gravity, 0) * part:GetMass() zerograv.Name = "ZeroGravity"
- end
- end
- ac = true
- game:GetService("RunService").Stepped:connect(function()
- owner.Character.Humanoid.Health = owner.Character.Humanoid.MaxHealth
- if movingup == false and movingback == false then
- owner.Character.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
- end
- rot = rot+5
- for number = 1,#popos do
- if popos[number].Parent == nil then
- table.remove(popos,number)
- end
- end
- for _,pop in pairs(popos) do
- pop.Touched:connect(function(hit)
- if hit.Locked == false then
- if hit.Parent ~= owner.Character then
- if hit ~= pop then
- hit.Color = pop.Color
- hit.Material = pop.Material
- pop:remove()
- end
- end
- end
- end)
- end
- armrot = armrot+40
- owner.Character.Humanoid.WalkSpeed = 500
- owner.Character.Humanoid.JumpPower = 1
- owner.Character.Humanoid.PlatformStand = true
- owner.Character.HumanoidRootPart.CFrame = CFrame.new(owner.Character.HumanoidRootPart.CFrame.p,game.Workspace.CurrentCamera.CFrame.p+game.Workspace.CurrentCamera.CFrame.lookVector*50000000)
- if ac == true then
- owner.Character.Torso:WaitForChild("Right Shoulder")
- owner.Character.Torso["Right Shoulder"].C0 = CFrame.new(owner.Character.Torso["Right Shoulder"].C0.p) *CFrame.Angles(math.rad(armrot*1.75),0,0)
- owner.Character.Torso:WaitForChild("Left Shoulder")
- owner.Character.Torso["Left Shoulder"].C0 = CFrame.new(owner.Character.Torso["Left Shoulder"].C0.p)*CFrame.Angles(math.rad(armrot*1.75),0,0)
- owner.Character.Torso:WaitForChild("Right Hip")
- owner.Character.Torso["Right Hip"].C0 = CFrame.new(owner.Character.Torso["Right Hip"].C0.p) *CFrame.Angles(math.rad(armrot*1.75),0,0)
- owner.Character.Torso:WaitForChild("Left Hip")
- owner.Character.Torso["Left Hip"].C0 = CFrame.new(owner.Character.Torso["Left Hip"].C0.p)*CFrame.Angles(math.rad(armrot*1.75),0,0)
- end
- if suck == nil then
- for _,bod in pairs(bodyforces) do
- bod:remove()
- end
- end
- if suck ~= nil then
- local pos1 = owner:GetMouse().Hit.p
- local pos2 = owner.Character.Head.CFrame:toWorldSpace(CFrame.new(Vector3.new(0,0.25,0.5))).p
- for _,child in pairs(game.Workspace:GetChildren()) do
- if child:IsA("BasePart") then
- if child.Anchored == false then
- if (child.Position-pos1).magnitude <= 1+owner.Character.Head.Size.Y*5 then
- local hit = child
- local did = false
- for i=1,#bodyforces do
- if bodyforces[i].Parent == hit then
- did = true
- end
- end
- if did == false then
- local bodyforce = Instance.new("BodyPosition",hit) bodyforce.Position = pos2
- table.insert(bodyforces,bodyforce)
- end
- end
- end
- end
- for _,child2 in pairs(child:GetChildren()) do
- if child2:IsA("BasePart") then
- if child2.Anchored == false then
- if (child2.Position-pos1).magnitude <= 1+owner.Character.Head.Size.Y*5 then
- local hit = child2
- local did = false
- for i=1,#bodyforces do
- if bodyforces[i].Parent == hit then
- did = true
- end
- end
- if did == false then
- local bodyforce = Instance.new("BodyPosition",hit) bodyforce.Position = pos2
- table.insert(bodyforces,bodyforce)
- end
- end
- end
- end
- for _,child3 in pairs(child2:GetChildren()) do
- if child3:IsA("BasePart") then
- if child3.Anchored == false then
- if (child3.Position-pos1).magnitude <= 1+owner.Character.Head.Size.Y*5 then
- local hit = child3
- local did = false
- for i=1,#bodyforces do
- if bodyforces[i].Parent == hit then
- did = true
- end
- end
- if did == false then
- local bodyforce = Instance.new("BodyPosition",hit) bodyforce.Position = pos2
- table.insert(bodyforces,bodyforce)
- end
- end
- end
- end
- end
- end
- end
- for _,bod in pairs(bodyforces) do
- bod.Position = owner.Character.Head.CFrame.p
- end
- suck.Mesh.Scale = Vector3.new(1+owner.Character.Head.Size.Y*5,(pos1-pos2).magnitude,1+owner.Character.Head.Size.Y*5)
- suck.CFrame = CFrame.new((pos1+pos2)/2,pos1) * CFrame.Angles(math.rad(90),rot,0)
- local ray = Ray.new(pos2,(pos1-pos2).unit*600)
- local hit,normal,position = game.Workspace:FindPartOnRay(ray,owner.Character)
- if hit ~= nil then
- if hit.Anchored == false then
- local did = false
- for i=1,#bodyforces do
- if bodyforces[i].Parent == hit then
- did = true
- end
- end
- if did == false then
- local bodyforce = Instance.new("BodyPosition",hit) bodyforce.Position = pos2
- table.insert(bodyforces,bodyforce)
- end
- end
- end
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "e" then
- suck = Instance.new("Part",owner.Character)
- local mesh = Instance.new("SpecialMesh",suck) mesh.MeshId = "rbxassetid://1040723301"
- suck.Transparency = 0.5
- suck.Color = Color3.fromRGB(255,255,255)
- suck.CanCollide = false
- suck.Anchored = true
- suck.Size = Vector3.new(0,0,0)
- owner.Character.Head:WaitForChild("face")
- while owner.Character.Head.face.texture ~= "rbxassetid://505480085" do
- wait()
- owner.Character.Head.face.Texture = "rbxassetid://505480085"
- end
- for _,decal in pairs(owner.Character.Head:GetChildren()) do
- if decal.ClassName == "Decal" then
- decal:remove()
- end
- end
- local decal = Instance.new("Decal",owner.Character.Head) decal.Texture = "http://www.roblox.com/asset/?id=1038938817" decal.Face = "Front"
- end
- if key == "w" then
- if movingup == false then
- movingup = true
- while movingup == true do
- wait()
- owner.Character.HumanoidRootPart.Velocity = owner.Character.HumanoidRootPart.CFrame.lookVector*200
- end
- end
- end
- if key == "s" then
- if movingback == false then
- movingback = true
- while movingback == true do
- wait()
- owner.Character.HumanoidRootPart.Velocity = -owner.Character.HumanoidRootPart.CFrame.lookVector*200
- end
- end
- end
- if key == "f" then
- local food = math.random(1,7)
- local part = Instance.new("Part",game.Workspace) part.CFrame = CFrame.new(0,25,0)
- local meshs = Instance.new("SpecialMesh",part)
- if food == 1 then
- part.Size = Vector3.new(1.266, 1.704, 0.978)
- meshs.MeshId = "rbxassetid://923471248"
- meshs.TextureId = "rbxassetid://923471252"
- end
- if food == 2 then
- part.Size = Vector3.new(2.18, 0.733, 2.18)
- meshs.MeshId = "http://www.roblox.com/asset/?id=107432887"
- meshs.TextureId = "rbxassetid://107432992"
- end
- if food == 3 then
- part.Size = Vector3.new(1.764, 1.129, 1.686)
- meshs.MeshId = "http://www.roblox.com/asset/?id=90824595"
- meshs.TextureId = "rbxassetid://90819050"
- end
- if food == 4 then
- part.Size = Vector3.new(2.903, 2.903, 0.531)
- meshs.MeshId = "http://www.roblox.com/asset/?id=18417911"
- meshs.TextureId = "rbxassetid://18417918"
- end
- if food == 5 then
- part.Size = Vector3.new(2.056, 0.615, 0.907)
- meshs.MeshId = "http://www.roblox.com/asset/?id=29896287"
- meshs.TextureId = "rbxassetid://29896653"
- end
- if food == 6 then
- part.Size = Vector3.new(0.731, 1.693, 0.708)
- meshs.MeshId = "http://www.roblox.com/asset/?id=13073626"
- meshs.TextureId = "rbxassetid://13073598"
- end
- if food == 7 then
- part.Size = Vector3.new(1.997, 1.986, 1.997)
- meshs.MeshId = "http://www.roblox.com/asset/?id=125736357"
- meshs.TextureId = "rbxassetid://125728597"
- end
- end
- if key == "c" then
- if popo > 0 then
- popo = popo-1
- local ball = Instance.new("Part",game.Workspace) ball.Shape = Enum.PartType.Ball ball.Material = Enum.Material.Slate ball.Color = Color3.fromRGB(105, 64, 40) ball.CanCollide = false
- ball.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- ball.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- ball.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- ball.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- ball.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- ball.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- ball.Size = Vector3.new(owner.Character.Torso.Size.Y/2,owner.Character.Torso.Size.Y/2,owner.Character.Torso.Size.Y/2)
- ball.CFrame = CFrame.new(owner.Character.Torso.CFrame:toWorldSpace(CFrame.new(0,-owner.Character.Torso.Size.Y,0)).p,owner:GetMouse().Hit.p)
- ball.Velocity = ball.CFrame.lookVector*(owner.Character.Torso.Position-owner:GetMouse().Hit.p).magnitude*3
- table.insert(popos,ball)
- game:GetService("Debris"):AddItem(ball,5)
- end
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key == "e" then
- suck:remove()
- suck = nil
- owner.Character.Head:WaitForChild("face")
- owner.Character.Head:WaitForChild("face")
- while owner.Character.Head.face.texture ~= "rbxassetid://1039774343" do
- wait()
- owner.Character.Head.face.Texture = "rbxassetid://1039774343"
- end
- end
- if key == "w" then
- movingup = false
- end
- if key == "s" then
- movingback = false
- end
- end)
- owner.Character.Head.Touched:connect(function(hit)
- if hit.Parent ~= owner.Character then
- if hit ~= nil then
- if hit.Anchored == false then
- hit:remove()
- popo = popo+2
- local sound = Instance.new("Sound",owner.Character.Head) sound.SoundId = "rbxassetid://179303694" sound:Play()
- game:GetService("Debris"):AddItem(sound,5)
- while ac == false do
- wait()
- if ac == true then
- break
- end
- end
- owner.Character.Torso:WaitForChild("Neck")
- owner.Character.HumanoidRootPart:WaitForChild("RootJoint")
- owner.Character.Torso:WaitForChild("Right Shoulder")
- owner.Character.Torso:WaitForChild("Left Shoulder")
- owner.Character.Torso:WaitForChild("Right Hip")
- owner.Character.Torso:WaitForChild("Left Hip")
- local rootjoint = owner.Character.HumanoidRootPart.RootJoint:Clone()
- local neck = owner.Character.Torso.Neck:Clone()
- local rightShoulder = owner.Character.Torso["Right Shoulder"]:Clone()
- local leftShoulder = owner.Character.Torso["Left Shoulder"]:Clone()
- local rightShoulder = owner.Character.Torso["Right Shoulder"]:Clone()
- local rightHip = owner.Character.Torso["Right Hip"]:Clone()
- local leftHip = owner.Character.Torso["Left Hip"]:Clone()
- ac = false
- wait(0.1)
- owner.Character.Humanoid.Health = owner.Character.Humanoid.MaxHealth
- for _,part in pairs(owner.Character:GetChildren()) do
- if part:IsA("BasePart") then
- part.Size = part.Size*1.05
- owner.Character.Humanoid.Health = owner.Character.Humanoid.MaxHealth
- end
- end
- owner.CameraMaxZoomDistance = owner.CameraMaxZoomDistance*1.05
- owner.Character.Humanoid.Health = owner.Character.Humanoid.MaxHealth
- rootjoint.Parent = owner.Character.HumanoidRootPart
- neck.Parent = owner.Character.Torso
- rightShoulder.Parent = owner.Character.Torso
- leftShoulder.Parent = owner.Character.Torso
- rightHip.Parent = owner.Character.Torso
- leftHip.Parent = owner.Character.Torso
- neck.C0 = CFrame.new(neck.C0.p*1.05)*CFrame.Angles(math.rad(-90),0,math.rad(180))
- rightShoulder.C0 = CFrame.new(rightShoulder.C0.p*1.05)
- leftShoulder.C0 = CFrame.new(leftShoulder.C0.p*1.05)
- rightHip.C0 = CFrame.new(rightHip.C0.p*1.05)
- leftHip.C0 = CFrame.new(leftHip.C0.p*1.05)
- owner.Character.Humanoid.MaxHealth = owner.Character.Humanoid.MaxHealth*1.2
- owner.Character.Humanoid.Health = owner.Character.Humanoid.MaxHealth
- for _,part in pairs(owner.Character:GetChildren()) do
- if part:FindFirstChild("ZeroGravity") then
- part.ZeroGravity:remove()
- end
- end
- for _,part in pairs(owner.Character:GetChildren()) do
- if part:IsA("BasePart") then
- part.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
- local zerograv = Instance.new("BodyForce",part) zerograv.force = Vector3.new(0, game.Workspace.Gravity, 0) * part:GetMass() zerograv.Name = "ZeroGravity"
- end
- end
- wait(0.1)
- ac = true
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement