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
- 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
- function Smooth(part)
- part.TopSurface = "Smooth"
- part.BottomSurface = "Smooth"
- part.RightSurface = "Smooth"
- part.LeftSurface = "Smooth"
- end
- plr = owner
- char = plr.Character
- ra = char["Right Arm"]
- la = char["Left Arm"]
- root = char.HumanoidRootPart
- hum = char.Humanoid
- clerp = function(toclerp, cf, number)
- local joint = toclerp
- joint.C0 = joint.C0:Lerp(cf, number)
- end
- clerp2 = function(toclerp, cf)
- local joint = toclerp
- joint.C0 = cf
- end
- clerp3 = function(toclerp, cf, number)
- local joint = toclerp
- joint.C1 = joint.C1:Lerp(cf, number)
- end
- Swait,swait = function(number)
- if number == 0 or number == nil then
- game:GetService("RunService").Heartbeat:Wait()
- else
- for i = 1,number do
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- end
- ezweld = function(p, a, b, cf)
- local weld = Instance.new("Weld",p)
- weld.Part0 = a
- weld.Part1 = b
- weld.C0 = cf
- return weld
- end
- IT = Instance.new
- Rad = math.rad
- Cos = math.cos
- Sin = math.sin
- BrickC = BrickColor.new
- C3 = Color3.new
- VT = Vector3.new
- anim = "Idle"
- attack = false
- local RS = char.Torso["Right Shoulder"]
- local LS = char.Torso["Left Shoulder"]
- local RH = char.Torso["Right Hip"]
- local LH = char.Torso["Left Hip"]
- local neck = char.Torso["Neck"]
- local anim = "Idle"
- local root = char.HumanoidRootPart
- local rootj = root.RootJoint
- local timepos = 0
- local sine = 0
- local RSnor = RS.C0
- local LSnor = LS.C0
- local RHnor = RH.C0
- local LHnor = LH.C0
- local RSnor2 = RS.C1
- local LSnor2 = LS.C1
- local RHnor2 = RH.C1
- local LHnor2 = LH.C1
- local rootjnor = rootj.C0
- local necknor = neck.C0
- local tors = char.Torso
- local playstealanim = false
- hum.Animator:Destroy()
- hold = false
- mouse = plr:GetMouse()
- hold = false
- Debris = game:GetService("Debris")
- --------------
- local joy = Instance.new("Part",char)
- joy.CanCollide = false
- joy.CFrame = tors.CFrame * CFrame.new(0, 2, 0)
- joy.Size = Vector3.new(7, 0.01, 7)
- local joyimage = Instance.new("Decal",joy)
- joyimage.Face = "Top"
- joyimage.Texture = "http://www.roblox.com/asset/?id=1176402123"
- local joyspin = 0
- function okhands(part)
- local ok = Instance.new("Part",char)
- ok.CanCollide = false
- ok.CFrame = tors.CFrame * CFrame.new(0, 2, 0)
- ok.Transparency = 1
- ok.Size = Vector3.new(part.Size.x, 0.01, part.Size.z)
- local okhand = Instance.new("Decal",ok)
- okhand.Face = "Bottom"
- okhand.Texture = "http://www.roblox.com/asset/?id=636768448"
- local wld = ezweld(char, ok, part, CFrame.new(0, 1, 0))
- return ok
- end
- okhands(ra)
- okhands(la)
- function Oof(Ch)
- if Ch.ClassName == "Model" and Ch ~= char then
- local D = Ch:GetDescendants()
- for i = 1,#D do
- local ee = D[i]
- if ee:IsA("Humanoid") then
- ee.BreakJointsOnDeath = false
- elseif ee:IsA("Motor6D") or ee:IsA("Motor") then
- local Old = ee.Parent
- ee.Parent = nil
- local R = Instance.new("Glue",Old)
- R.Name = ee.Name
- R.Part0 = ee.Part0
- R.Part1 = ee.Part1
- R.C0 = ee.C0
- R.C1 = ee.C1
- end
- end
- end
- end
- function Dismember(MAN,DOWHAT)
- local HUM = MAN:FindFirstChildOfClass("Humanoid")
- if HUM then
- HUM.Health = 0
- HUM.PlatformStand = true
- end
- Oof(MAN)
- end
- function continuesteal()
- attack = true
- playstealanim = false
- for i = 1,35 do
- Swait()
- if playstealanim == false then
- root.CFrame = CFrame.new(root.CFrame.x, root.CFrame.y, root.CFrame.z) * CFrame.new(0, 2, 0)
- root.Anchored = true
- clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.1 * Cos(sine / 12)) * CFrame.Angles(Rad(-90), Rad(0), Rad(0)), 0.15)
- clerp(RH, RHnor * CFrame.new(0, 0 - 0.1 * Cos(sine / 12), 0) * CFrame.Angles(0, Rad(-10), 0), 0.15)
- clerp(LH, LHnor * CFrame.new(0, 0 - 0.1 * Cos(sine / 12), 0) * CFrame.Angles(0, Rad(10), 0), 0.15)
- clerp(RS, RSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(15), Rad(90)), 0.15)
- clerp(LS, LSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(-67), Rad(-90) - Rad(15)), 0.15)
- end
- end
- for i = 1,35 do
- Swait()
- if playstealanim == false then
- root.CFrame = CFrame.new(root.CFrame.x, root.CFrame.y, root.CFrame.z) * CFrame.new(0, -2, 0)
- root.Anchored = true
- clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.1 * Cos(sine / 12)) * CFrame.Angles(Rad(90), Rad(0), Rad(0)), 0.15)
- clerp(RH, RHnor * CFrame.new(0, 0 - 0.1 * Cos(sine / 12), 0) * CFrame.Angles(0, Rad(-10), 0), 0.15)
- clerp(LH, LHnor * CFrame.new(0, 0 - 0.1 * Cos(sine / 12), 0) * CFrame.Angles(0, Rad(10), 0), 0.15)
- clerp(RS, RSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(15), Rad(90)), 0.15)
- clerp(LS, LSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(-67), Rad(-90) - Rad(15)), 0.15)
- end
- end
- local raw = char:FindFirstChild("weldie")
- if raw then
- raw.Parent = nil
- attack = false
- end
- attack = false
- root.Anchored = false
- end
- function steal()
- attack = true
- playstealanim = true
- local hitbox = ra.Touched:connect(function(hit)
- local man = hit.Parent
- if man:FindFirstChild("Head") and playstealanim == true and man ~= char then
- local weldtho = ezweld(char, man.Head, ra, CFrame.new())
- weldtho.Name = "weldie"
- Dismember(man, "Ragdoll")
- playstealanim = false
- continuesteal()
- elseif man:FindFirstChild("Head") and playstealanim == true and man ~= char then
- local weldtho = ezweld(char, man.Head, ra, CFrame.new())
- weldtho.Name = "weldie"
- Dismember(man, "Ragdoll")
- playstealanim = false
- continuesteal()
- end
- end)
- for i = 1,35 do
- Swait()
- if playstealanim == true then
- if ra:FindFirstChild("weldie") then
- root.CFrame = CFrame.new(root.CFrame.x, root.CFrame.y, root.CFrame.z) * CFrame.new(0, 2, 0)
- root.Anchored = true
- end
- clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.1 * Cos(sine / 12)), 0.15)
- clerp(RH, RHnor * CFrame.new(0, 0 - 0.1 * Cos(sine / 12), 0) * CFrame.Angles(0, Rad(-10), 0), 0.15)
- clerp(LH, LHnor * CFrame.new(0, 0 - 0.1 * Cos(sine / 12), 0) * CFrame.Angles(0, Rad(10), 0), 0.15)
- clerp(RS, RSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(15), Rad(90)), 0.15)
- clerp(LS, LSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(-67), Rad(-90) - Rad(15)), 0.15)
- else
- hitbox:disconnect()
- end
- end
- root.Anchored = false
- if playstealanim == true then
- attack = false
- playstealanim = false
- else
- attack = true
- playstealanim = false
- end
- end
- mouse.KeyDown:connect(function(key)
- key = key:lower()
- if key == "e" and attack == false then
- steal()
- end
- end)
- while true do
- Swait()
- ra.Transparency = 0
- sine = sine + 1
- joyspin = joyspin + 1
- joy.Transparency = 1
- joy.CFrame = CFrame.new(root.CFrame.x, root.CFrame.y, root.CFrame.z) * CFrame.new(0, -3, 0) * CFrame.Angles(0, Rad(-joyspin), 0)
- joy.Anchored = true
- local TORSOVELOCITY = (root.Velocity * VT(1, 0, 1)).magnitude
- if TORSOVELOCITY < 1 then
- anim = "Idle"
- if attack == false then
- clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.1 * Cos(sine / 12)), 0.15)
- clerp(RH, RHnor * CFrame.new(0, 0 - 0.1 * Cos(sine / 12), 0) * CFrame.Angles(0, Rad(-10), 0), 0.15)
- clerp(LH, LHnor * CFrame.new(0, 0 - 0.1 * Cos(sine / 12), 0) * CFrame.Angles(0, Rad(10), 0), 0.15)
- clerp(RS, RSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(85), Rad(90)), 0.15)
- clerp(LS, LSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(-67), Rad(-90) - Rad(15)), 0.15)
- end
- clerp3(RH, RHnor2 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 0.15)
- clerp3(LH, LHnor2 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 0.15)
- else
- anim = "Walk"
- if attack == false then
- clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.2 * Cos(sine / 4)), 0.15)
- clerp(RH, RHnor * CFrame.new(0.25, 0 - 0.2 * Cos(sine / 4), 0) * CFrame.Angles(0, Rad(0), 0), 0.15)
- clerp(LH, LHnor * CFrame.new(-0.25, 0 - 0.2 * Cos(sine / 4), 0) * CFrame.Angles(0, Rad(0), 0), 0.15)
- --clerp(RS, RSnor * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0 - 1.5 * Cos(sine / 8)), 0.15)
- --clerp(LS, LSnor * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0 - 1.5 * Cos(sine / 8)), 0.15)
- clerp(RS, RSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(85), Rad(90)), 0.15)
- clerp(LS, LSnor * CFrame.new(0, 0.01, -0.5) * CFrame.Angles(0, Rad(-67), Rad(-90) - Rad(15)), 0.15)
- end
- clerp3(RH, RHnor2 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0.5 + 1.25 * Cos(sine / 8)), 0.15)
- clerp3(LH, LHnor2 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, -0.5 + 1.25 * Cos(sine / 8)), 0.15)
- --clerp3(LS, LSnor2 * CFrame.Angles(0, 0, 0 - 1 * Cos(sine / 8)), 0.15)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement