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
- plyr = owner
- char = plyr.Character
- torso = char.Torso
- Run = game:service'RunService'
- deb = game:service'Debris'
- ra = char["Right Arm"]
- la = char["Left Arm"]
- rs = char.Torso["Right Shoulder"]
- ls = char.Torso["Left Shoulder"]
- local platform = false
- local idle = true
- iliketrains = {}
- part1 = Instance.new("Part", char)
- part1.FormFactor = "Symmetric"
- part1.Size = Vector3.new(1, 3, 1)
- part1.TopSurface = 0
- part1.BottomSurface = 0
- part1:BreakJoints()
- special = Instance.new("SpecialMesh", part1)
- special.MeshId = "http://www.roblox.com/asset/?id=25498565"
- special.TextureId = "http://www.roblox.com/asset/?id=26725707"
- special.Scale = Vector3.new(2, 2, 2)
- w = Instance.new("Weld", char)
- w.Part0 = part1
- w.Part1 = torso
- w.C0 = CFrame.new(-0.4, -1.4, -0.5) * CFrame.Angles(-0.5, 0, 0.2)
- part2 = Instance.new("Part", char)
- part2.FormFactor = "Symmetric"
- part2.Size = Vector3.new(1, 3, 1)
- part2.TopSurface = 0
- part2.BottomSurface = 0
- part2:BreakJoints()
- special2 = Instance.new("SpecialMesh", part2)
- special2.MeshId = "http://www.roblox.com/asset/?id=25498565"
- special2.TextureId = "http://www.roblox.com/asset/?id=26725707"
- special2.Scale = Vector3.new(2, 2, 2)
- w2 = Instance.new("Weld", char)
- w2.Part0 = part2
- w2.Part1 = torso
- w2.C0 = CFrame.new(0.4, -1.4, -0.5) * CFrame.Angles(-0.5, 0, -0.2)
- tool = Instance.new("HopperBin", plyr.Backpack)
- tool.Name = " "
- tool.TextureId = "http://www.roblox.com/asset/?id=27471616"
- tool.Selected:connect(function(mouse)
- mouse.Button1Down:connect(function(mouse)
- if equipped then return end
- equipped = true
- coroutine.wrap(function()
- while equipped do
- rs.DesiredAngle = 0
- rs.CurrentAngle = 0
- ls.DesiredAngle = 0
- ls.CurrentAngle = 0
- Run.Stepped:wait()
- end
- end)()
- coroutine.wrap(function()
- idle = false
- coroutine.wrap(function()
- for i = 0, 3 do
- w.C0 = w.C0 * CFrame.new(0, 0.05, 0)
- w2.C0 = w2.C0 * CFrame.new(0, 0.05, 0)
- Run.Stepped:wait()
- end
- wait(0.147)
- for i = 0, 3 do
- w.C0 = w.C0 * CFrame.new(0, -0.05, 0)
- w2.C0 = w2.C0 * CFrame.new(0, -0.05, 0)
- Run.Stepped:wait()
- end
- end)()
- local p = Instance.new("Part", char)
- p.FormFactor = "Custom"
- p.Name = "Platform"
- p.Transparency = 1
- p.Size = Vector3.new(4, 1, 4)
- p.Anchored = true
- for i = 2.5, 6, 0.05 do
- p.CFrame = CFrame.new(torso.CFrame.x, torso.CFrame.y-i, torso.CFrame.z)
- Run.Stepped:wait()
- end
- coroutine.wrap(function()
- p:Destroy()
- end)()
- end)()
- for i = 0, 4 do
- ls.C0 = ls.C0 * CFrame.Angles(-0.25, 0, 0)
- rs.C0 = rs.C0 * CFrame.Angles(-0.25, 0, 0)
- Run.Stepped:wait()
- end
- wait(0.02)
- for i = 0, 4 do
- ls.C0 = ls.C0 * CFrame.Angles(0.25, 0, 0)
- rs.C0 = rs.C0 * CFrame.Angles(0.25, 0, 0)
- Run.Stepped:wait()
- end
- idle = true
- equipped = false
- end)
- end)
- while idle do
- for i = 0, 3 do
- w.C0 = w.C0 * CFrame.Angles(0, 0.002 * i, 0)
- w2.C0 = w2.C0 * CFrame.Angles(0, -0.002 * i, 0)
- Run.Stepped:wait()
- end
- wait(0.112687)
- for i = 0, 3 do
- w.C0 = w.C0 * CFrame.Angles(0, -0.002 * i, 0)
- w2.C0 = w2.C0 * CFrame.Angles(0, 0.002 * i, 0)
- Run.Stepped:wait()
- end
- wait(0.312687)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement