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,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end local plr = game:GetService("Players").LocalPlayer
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local mou = plr:GetMouse()
- local tor = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local head = char:FindFirstChild("Head")
- local face = head:FindFirstChildOfClass("Decal")
- local neck = tor:FindFirstChild("Neck")
- local larm = char:FindFirstChild("Left Arm") or char:FindFirstChild("LeftUpperArm")
- local rarm = char:FindFirstChild("Right Arm") or char:FindFirstChild("RightUpperArm")
- local rleg = char:FindFirstChild("Right Leg") or char:FindFirstChild("RightUpperLeg")
- local lleg = char:FindFirstChild("Left Leg") or char:FindFirstChild("LeftUpperLeg")
- local ls = tor:FindFirstChild("Left Shoulder")
- local rs = tor:FindFirstChild("Right Shoulder")
- local punching = false
- local attack = false
- local out = false
- char.Archivable = true
- local Schar = char:Clone()
- local Slarm = Schar:FindFirstChild("Left Arm")
- local Srarm = Schar:FindFirstChild("Right Arm")
- Schar.Parent = char
- Schar:MoveTo(tor.Position + Vector3.new(0, -5, 0))
- Schar.Name = char.Name.."'s (crappy) Stand"
- local Shum = Schar:FindFirstChildOfClass("Humanoid")
- local Stor = Schar:FindFirstChild("Torso") or Schar:FindFirstChild("UpperTorso")
- Stor.Anchored = true
- local Shead = Schar:FindFirstChild("Head")
- local Sface = Shead:FindFirstChildOfClass("Decal")
- Sface:Destroy()
- local Sls = Stor:FindFirstChild("Left Shoulder")
- local Srs = Stor:FindFirstChild("Right Shoulder")
- local Slleg = Schar:FindFirstChild("Left Leg")
- local Srleg = Schar:FindFirstChild("Right Leg")
- local Slsstart = Sls.C1
- local Srsstart = Srs.C1
- local Slsstart2 = Sls.C1 * CFrame.Angles(0, 0, math.rad(90))
- local Srsstart2 = Srs.C1 * CFrame.Angles(0, 0, math.rad(-90))
- local finish = tor.CFrame * CFrame.new(0, 1.5, 3)
- local finish2 = tor.CFrame * CFrame.new(0, 2, 3)
- local Slsfinish = Sls.C1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, math.rad(0))
- local Slsfinish2 = Sls.C1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, math.rad(0))
- local Srsfinish = Srs.C1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, math.rad(0))
- local Srsfinish2 = Srs.C1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, math.rad(0))
- Shead.CanCollide = false
- Stor.CanCollide = false
- Slarm.CanCollide = false
- Srarm.CanCollide = false
- char.Archivable = false
- for i,v in pairs(Schar:GetChildren()) do
- if v:IsA("Part") then
- v.Transparency = 0.5
- v.Material = "Neon"
- v.CanCollide = false
- end
- if v:IsA("Accessory") then
- v.Handle.Anchored = false
- end
- end
- function down(key)
- if key == "e" then
- punching = true
- wait()
- Sls.C1 = Slsstart2
- Srs.C1 = Srsstart2
- local aSlsstart = Sls.C1
- local aSrsstart = Srs.C1
- while punching == true do
- local hit1 = Slarm:GetConnectedParts()
- if hit1.Parent and hit1.Parent.Name ~= char.Name and hit1.Parent:FindFirstChildOfClass("Humanoid") then
- local owhum = hit1.Parent:FindFirstChild("Humanoid")
- owhum.Health = owhum.Health - 10
- end
- local hit2 = Slarm:GetConnectedParts()
- if hit2.Parent and hit2.Parent.Name ~= char.Name and hit2.Parent:FindFirstChildOfClass("Humanoid") then
- local owhum2 = hit2.Parent:FindFirstChild("Humanoid")
- owhum2.Health = owhum2.Health - 10
- end
- wait()
- attack = true
- finish2 = tor.CFrame * CFrame.new(0, 0.5, -4)
- finish = tor.CFrame * CFrame.new(0, 0.5, -4)
- Sls.C1 = aSlsstart * CFrame.new(1, 0, 0)
- Srs.C1 = aSrsstart
- wait()
- Sls.C1 = aSlsstart
- Srs.C1 = aSrsstart * CFrame.new(-1, 0, 0)
- wait()
- end
- wait()
- end
- end
- function up(key)
- if key == "e" then
- punching = false
- wait()
- while punching == false do
- wait()
- attack = false
- Sls.C1 = Slsstart
- Srs.C1 = Srsstart
- Slsfinish = Slsstart
- Slsfinish2 = Slsstart
- Srsfinish = Srsstart
- Srsfinish2 = Srsstart
- finish2 = tor.CFrame * CFrame.new(0, 2.5, 3)
- finish = tor.CFrame * CFrame.new(0, 2.5, 3)
- end
- wait()
- end
- end
- mou.KeyDown:connect(down)
- mou.KeyUp:connect(up)
- while true do
- wait()
- for i = 0,1,.1 do
- local start = Stor.CFrame
- Stor.CFrame = start:lerp(finish, i)
- wait()
- end
- for i = 0,1,.1 do
- local start = Stor.CFrame
- Stor.CFrame = start:lerp(finish2, i)
- wait()
- end
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement