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
- local plr = owner
- local char = plr.Character
- local m = Instance.new("Model", game.Workspace)
- m.Name = "Guest666"
- local h = Instance.new("Part",m)
- h.Name = "Head"
- local me = plr.Character.Head.Mesh:Clone()
- me.Parent = h
- local facee = plr.Character.Head.face:Clone()
- facee.Parent = h
- h.Size = plr.Character.Head.Size
- h:BreakJoints()
- h.CanCollide = false
- h.Position = plr.Character.Head.Position
- h.Position = h.Position + Vector3.new(0, 10, 0)
- h.face.Texture = "http://www.roblox.com/asset/?id=1282052398"
- local t = Instance.new("Part",m)
- t.Name = "Torso"
- t.Size = plr.Character.Torso.Size
- t:BreakJoints()
- t.CanCollide = false
- t.Position = plr.Character.Torso.Position
- t.Position = t.Position + Vector3.new(0, 10, 0)
- local r = Instance.new("Part",m)
- r.Name = "HumanoidRootPart"
- r.Size = plr.Character.Torso.Size
- r:BreakJoints()
- r.CanCollide = false
- r.Position = plr.Character.Torso.Position
- r.Position = t.Position + Vector3.new(0, 10, 0)
- r.Transparency = 1
- local ra = Instance.new("Part",m)
- ra.Name = "Right Arm"
- ra.Size = plr.Character["Right Arm"].Size
- ra:BreakJoints()
- ra.Position = plr.Character["Right Arm"].Position
- ra.Position = ra.Position + Vector3.new(0, 10, 0)
- local la = Instance.new("Part",m)
- la.Name = "Left Arm"
- la.Size = plr.Character["Left Arm"].Size
- la:BreakJoints()
- la.Position = plr.Character["Left Arm"].Position
- la.Position = la.Position + Vector3.new(0, 10, 0)
- local ll = Instance.new("Part",m)
- ll.Name = "Left Leg"
- ll.Size = plr.Character["Left Leg"].Size
- ll:BreakJoints()
- ll.Position = plr.Character["Left Leg"].Position
- ll.Position = ll.Position + Vector3.new(0, 10, 0)
- local rl = Instance.new("Part",m)
- rl.Name = "Right Leg"
- rl.Size = plr.Character["Right Leg"].Size
- rl:BreakJoints()
- rl.Position = plr.Character["Right Leg"].Position
- rl.Position = rl.Position + Vector3.new(0, 10, 0)
- for i,v in pairs(m:GetChildren()) do
- v:BreakJoints()
- end
- local rootj = Instance.new("Motor6D")
- rootj.Name = "RootJoint"
- rootj.Part0 = r
- rootj.Part1 = t
- rootj.Parent = r
- local neck = Instance.new("Motor6D")
- neck.Name = "Neck"
- neck.Part0 = t
- neck.Part1 = h
- neck.Parent = t
- neck.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- neck.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- local RS = Instance.new("Motor6D")
- RS.Name = "Right Shoulder"
- RS.Part0 = t
- RS.Part1 = ra
- RS.Parent = t
- RS.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- RS.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- local LS = Instance.new("Motor6D")
- LS.Name = "Left Shoulder"
- LS.Part0 = t
- LS.Part1 = la
- LS.Parent = t
- LS.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- LS.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local LH = Instance.new("Motor6D")
- LH.Name = "Left Hip"
- LH.Part0 = t
- LH.Part1 = ll
- LH.Parent = t
- LH.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- LH.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local RH = Instance.new("Motor6D")
- RH.Name = "Right Hip"
- RH.Part0 = t
- RH.Part1 = rl
- RH.Parent = t
- RH.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- RH.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- wait(0.000000000000001)
- local hu = Instance.new("Humanoid", m)
- hu.MaxHealth = 0
- hu.Health = 0
- hu.WalkSpeed = 16
- h.BrickColor = BrickColor.new("Really black")
- ra.BrickColor = BrickColor.new("Really black")
- la.BrickColor = BrickColor.new("Really black")
- t.BrickColor = BrickColor.new("Really black")
- rl.BrickColor = BrickColor.new("Really black")
- ll.BrickColor = BrickColor.new("Really black")
- local hum = m:WaitForChild("Humanoid")
- local normalanim = true
- local animpose = "Idle"
- local sine = 0
- local RSnor = RS.C0
- local LSnor = LS.C0
- local RHnor = RH.C0
- local LHnor = LH.C0
- local necknor = neck.C0
- local rootjnor = rootj.C0
- char = m
- local torso = Instance.new("CharacterMesh", game.Workspace)
- torso.BodyPart = "Torso"
- torso.MeshId = "27111894"
- torso.Parent = char
- local lleg = Instance.new("CharacterMesh", game.Workspace)
- lleg.BodyPart = "LeftLeg"
- lleg.MeshId = "27111857"
- lleg.Parent = char
- local rleg = Instance.new("CharacterMesh", game.Workspace)
- rleg.BodyPart = "RightLeg"
- rleg.MeshId = "27111882"
- rleg.Parent = char
- local larm = Instance.new("CharacterMesh", game.Workspace)
- larm.BodyPart = "LeftArm"
- larm.MeshId = "27111419"
- larm.Parent = char
- local rarm = Instance.new("CharacterMesh", game.Workspace)
- rarm.BodyPart = "RightArm"
- rarm.MeshId = "27111864"
- rarm.Parent = char
- local hair = Instance.new("Accessory")
- hair.AttachmentPos = Vector3.new(0, -0.05, 0.1)
- local ha = Instance.new("Part",hair)
- ha.Name = "Handle"
- ha.Size = Vector3.new(1, 1, 2)
- local me = Instance.new("SpecialMesh", ha)
- me.MeshId = "http://www.roblox.com/asset/?id=46834172"
- me.TextureId = "http://www.roblox.com/asset/?id=47991609"
- me.Scale = Vector3.new(1.05, 1.05, 1.05)
- me.VertexColor = Vector3.new(1, 1, 1)
- hair.Parent = m
- local sh = Instance.new("Shirt",m)
- sh.ShirtTemplate = "http://www.roblox.com/asset/?id=8561740"
- sh.Name = "Shirt"
- local tag = Instance.new("StringValue",m)
- tag.Name = "Guest666"
- tag.Value = owner.Name
- local killing = false
- -- Don't change.
- while game:GetService("RunService").Heartbeat:Wait() do
- if normalanim then
- sine = sine + 1
- end
- -- AI
- ------------------------
- for i,v in pairs(workspace:GetChildren()) do
- if v.Name == "Guest666" then
- if not(v:FindFirstChildOfClass("Humanoid") == nil) then
- if v:FindFirstChild("Guest666") ~= nil then
- local h = v:FindFirstChildOfClass("Humanoid")
- h.PlatformStand = false
- if not(v:FindFirstChild("Torso") == nil) then
- function onTouched(fire)
- local humn = fire.Parent:FindFirstChildOfClass("Humanoid")
- if humn then
- if humn.Parent then
- for i,n in pairs (humn.Parent:GetChildren()) do
- if n.ClassName == "Part" then
- if killing == false then
- for i = 1,2 do
- local p = Instance.new("Part",workspace)
- p.CanCollide = false
- p.Transparency = 0.5
- p.Size = Vector3.new(1,1,1)
- p.BrickColor = BrickColor.new("Really black")
- p.Position = n.Position
- p.Velocity = Vector3.new(math.random(-50,50),100,math.random(-50,50))
- end
- killing = true
- n:Destroy()
- wait(0.5)
- killing = false
- end
- end
- end
- end
- end
- end
- end
- t.Touched:connect(onTouched)
- s = v
- local larm = s:FindFirstChild("Left Arm")
- local rarm = s:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 100000000000000000000000000000000000000000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= s) then
- temp = temp2:FindFirstChild("Head")
- h = temp2:FindFirstChildOfClass("Humanoid")
- if (temp ~= nil) and (h ~= nil) and (h.Health > 0) then
- s.Humanoid.WalkSpeed = 15
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- local antibug = s:FindFirstChild("Torso")
- if antibug ~= nil then
- local target = findNearestTorso(antibug.Position)
- if target ~= nil then
- s.Humanoid:MoveTo(target.Position, target)
- s.Humanoid.WalkSpeed = 15
- end
- end
- end
- end
- end
- end
- ------------------------
- hum.Health = 9999999999999999
- local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
- if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
- animpose = "Walking"
- elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
- animpose = "Jumping"
- elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
- animpose = "Falling"
- else
- animpose = "Idle"
- end
- if animpose == "Idle" and normalanim then
- rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
- RS.C0 = RS.C0:Lerp(RSnor, 0.15)
- LS.C0 = LS.C0:Lerp(LSnor, 0.15)
- RH.C0 = RH.C0:Lerp(RHnor, 0.15)
- LH.C0 = LH.C0:Lerp(LHnor, 0.15)
- elseif animpose == "Walking" and normalanim then
- rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
- RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
- LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
- elseif animpose == "Jumping" and normalanim then
- rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-0.5, 0, 0), 0.15)
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.3, 0, 0), 0.14)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.3, 0, 0), 0.14)
- RH.C0 = RH.C0:Lerp(RHnor, 0.15)
- LH.C0 = LH.C0:Lerp(LHnor, 0.15)
- elseif animpose == "Falling" and normalanim then
- rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0.5, 0, 0), 0.15)
- RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.6, 0, 0), 0.14)
- LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.6, 0, 0), 0.14)
- RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(-0.3, 0, 0), 0.10)
- LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(-0.3, 0, 0), 0.10)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement