Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- 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
- for _,child in pairs (owner.Character:GetChildren()) do
- if child.ClassName == "Accessory" then
- child:remove()
- end
- end
- for _,child in pairs (owner.Character:GetChildren()) do
- if child.ClassName == "Part" then
- child.Transparency = 1
- if child:FindFirstChild("face") then
- child.face:remove()
- end
- end
- end
- if owner.Character.Head:FindFirstChild("Jumping") then
- owner.Character.Head.Jumping.SoundId = "rbxassetid://726242769"
- end
- owner.Character.Humanoid.WalkSpeed = 20
- owner.Character.Humanoid.MaxHealth = math.huge
- owner.Character.Humanoid.Health = math.huge
- B = Instance.new("Part")
- B.Name = "Body"
- B.Size = Vector3.new(5.5, 5.5, 5.5)
- B.Parent = owner.Character
- W = Instance.new("Weld")
- W.Parent = B
- W.Part0 = B
- W.Part1 = owner.Character.HumanoidRootPart
- M = Instance.new("SpecialMesh")
- M.Parent = B
- M.MeshId = "http://www.roblox.com/asset/?id=37223787"
- M.TextureId = "http://www.roblox.com/asset/?id=37606814"
- M.Scale = Vector3.new(8, 8, 8)
- A = Instance.new("Sound")
- A.Name = "Taunt"
- A.SoundId = "rbxassetid://189652125"
- A.Playing = true
- A.Parent = B
- E = Instance.new("Sound")
- E.Name = "Eat"
- E.Parent = B
- E.SoundId = "rbxassetid://212887990"
- E.Volume = 2
- FF = Instance.new("ForceField")
- FF.Parent = owner.Character
- FF.Visible = false
- P = Instance.new("Part")
- P.Name = "Eyes"
- P.Parent = B
- P.CanCollide = false
- W2 = Instance.new("Weld")
- W2.Parent = B
- W2.Part0 = B
- W2.Part1 = P
- eyes = Instance.new("SpecialMesh")
- eyes.Parent = P
- eyes.MeshId = "http://www.roblox.com/asset/?id=15721278"
- eyes.TextureId = "rbxassetid://15721268"
- eyes.Scale = Vector3.new(4.5, 4.5, 4.5)
- eyes.Offset = Vector3.new(0, 0.5, -0.1)
- mouse5.KeyDown:connect(function(key)
- if key == string.char(32) then
- owner.Character.Humanoid.WalkSpeed = 20
- end
- end)
- mouse5.KeyUp:connect(function(key)
- if key == string.char(32) then
- owner.Character.Humanoid.WalkSpeed = 0
- end
- end)
- function onTouched(part)
- if B.Velocity.Magnitude > 4 then
- for _,child in pairs (part.Parent:GetChildren()) do
- if child.ClassName == "Humanoid" then
- M.Scale = M.Scale + Vector3.new(0.1, 0.1, 0.1)
- M.Offset = M.Offset + Vector3.new(0, 0.035, 0)
- owner.Character.Humanoid.JumpPower = owner.Character.Humanoid.JumpPower + 0.25
- eyes.Scale = eyes.Scale + Vector3.new(0.0575, 0.0575, 0.0575)
- eyes.Offset = eyes.Offset + Vector3.new(0, 0.0325, 0)
- E.Playing = true
- if owner.Character.Head:FindFirstChild("Jumping") then
- owner.Character.Head.Jumping.Volume = owner.Character.Head.Jumping.Volume + 0.010
- owner.Character.Head.Jumping.PlaybackSpeed = owner.Character.Head.Jumping.PlaybackSpeed - 0.002
- owner.Character.Humanoid.CameraOffset = owner.Character.Humanoid.CameraOffset + Vector3.new(0, 0.025, 0)
- part:remove()
- end
- end
- end
- end
- end
- B.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement