Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- local a=RealPlayer;char=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
- mas = owner.Character
- player = owner
- mouse = player:GetMouse()
- char = owner.Character
- wait()
- coroutine.resume(coroutine.create(function()
- while true do
- for i,v in pairs(char.Animate:GetChildren()) do
- for i,animation in pairs(v:GetChildren()) do
- animation.AnimationId = "rbxassetid://0"
- dooo = char.Humanoid:LoadAnimation(animation)
- dooo:Stop()
- end
- end
- wait(0.0001)
- end
- end))
- Part0 = Instance.new("Part")
- SpecialMesh1 = Instance.new("SpecialMesh")
- Weld2 = Instance.new("Weld")
- Part3 = owner.Character.Head
- BillboardGui4 = Instance.new("BillboardGui")
- ImageLabel5 = Instance.new("ImageLabel")
- Part6 = owner.Character["Left Arm"]
- SpecialMesh7 = Instance.new("SpecialMesh")
- Part8 = owner.Character["Left Leg"]
- SpecialMesh9 = Instance.new("SpecialMesh")
- Part10 = owner.Character["Right Arm"]
- Part11 = owner.Character["Right Leg"]
- SpecialMesh12 = Instance.new("SpecialMesh")
- Part13 = owner.Character.Torso
- SpecialMesh14 = Instance.new("SpecialMesh")
- Motor6D15 = Instance.new("Motor6D")
- Motor6D16 = Instance.new("Motor6D")
- Motor6D17 = Instance.new("Motor6D")
- Motor6D18 = Instance.new("Motor6D")
- Motor6D19 = Instance.new("Motor6D")
- Part0.Name = "Hammer"
- Part0.Parent = mas
- Part0.CFrame = CFrame.new(1.26990902, 17.1875, 22.0099335, 1, -4.94467658e-22, 2.08314539e-18, 4.94467658e-22, 1, -5.48416455e-22, -2.08314539e-18, 5.48416455e-22, 1)
- Part0.Position = Vector3.new(1.26990902, 17.1875, 22.0099335)
- Part0.Size = Vector3.new(0.75, 1, 4)
- Part0.CanCollide = false
- Part0.Locked = true
- Part0.FormFactor = Enum.FormFactor.Custom
- Part0.formFactor = Enum.FormFactor.Custom
- SpecialMesh1.Parent = Part0
- SpecialMesh1.MeshId = "rbxassetid://300344064"
- SpecialMesh1.Scale = Vector3.new(0.850000024, 0.850000024, 0.850000024)
- SpecialMesh1.TextureId = "rbxassetid://300344518"
- SpecialMesh1.MeshType = Enum.MeshType.FileMesh
- Part3.Name = "Head"
- Part3.Parent = mas
- Part3.CFrame = CFrame.new(0.0999030322, 19.2274952, 22.9599476, 1, -4.94467658e-22, 2.08314539e-18, 4.94467658e-22, 1, -5.48416455e-22, -2.08314539e-18, 5.48416455e-22, 1)
- Part3.Position = Vector3.new(0.0999030322, 19.2274952, 22.9599476)
- Part3.Transparency = 1
- Part3.Size = Vector3.new(1.75, 1.98999989, 0.75)
- Part3.Locked = true
- Part3.FormFactor = Enum.FormFactor.Custom
- Part3.formFactor = Enum.FormFactor.Custom
- BillboardGui4.Name = "Logo"
- BillboardGui4.Parent = Part3
- BillboardGui4.Enabled = false
- BillboardGui4.Size = UDim2.new(4.5, 0, 2.125, 0)
- BillboardGui4.Adornee = Part3
- BillboardGui4.StudsOffset = Vector3.new(0, 2.25, 0)
- ImageLabel5.Parent = BillboardGui4
- ImageLabel5.Size = UDim2.new(1, 0, 1, 0)
- ImageLabel5.BackgroundColor = BrickColor.new("Institutional white")
- ImageLabel5.BackgroundColor3 = Color3.new(1, 1, 1)
- ImageLabel5.BackgroundTransparency = 1
- ImageLabel5.BorderSizePixel = 0
- ImageLabel5.Image = "http://www.roblox.com/asset/?id=300344622"
- Part6.Name = "Left Arm"
- Part6.Parent = mas
- Part6.CFrame = CFrame.new(-1.27009189, 16.9575005, 22.9699402, 1, -4.94467658e-22, 2.08314539e-18, 4.94467658e-22, 1, -5.48416455e-22, -2.08314539e-18, 5.48416455e-22, 1)
- Part6.Position = Vector3.new(-1.27009189, 16.9575005, 22.9699402)
- Part6.Size = Vector3.new(0.75, 2.375, 0.75)
- Part6.CanCollide = false
- Part6.Locked = true
- Part6.FormFactor = Enum.FormFactor.Custom
- Part6.formFactor = Enum.FormFactor.Custom
- SpecialMesh7.Parent = Part6
- SpecialMesh7.MeshId = "rbxassetid://300344022"
- SpecialMesh7.Scale = Vector3.new(0.850000024, 0.850000024, 0.850000024)
- SpecialMesh7.TextureId = "rbxassetid://300344518"
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- Part8.Name = "Left Leg"
- Part8.Parent = mas
- Part8.CFrame = CFrame.new(-0.400086999, 15.6175003, 22.7199345, 1, -4.94467658e-22, 2.08314539e-18, 4.94467658e-22, 1, -5.48416455e-22, -2.08314539e-18, 5.48416455e-22, 1)
- Part8.Position = Vector3.new(-0.400086999, 15.6175003, 22.7199345)
- Part8.Size = Vector3.new(0.75, 2.375, 0.75)
- Part8.CanCollide = false
- Part8.Locked = true
- Part8.FormFactor = Enum.FormFactor.Custom
- Part8.formFactor = Enum.FormFactor.Custom
- SpecialMesh9.Parent = Part8
- SpecialMesh9.MeshId = "rbxassetid://300344043"
- SpecialMesh9.Scale = Vector3.new(0.850000024, 0.850000024, 0.850000024)
- SpecialMesh9.TextureId = "rbxassetid://300344518"
- SpecialMesh9.MeshType = Enum.MeshType.FileMesh
- Part10.Name = "Right Arm"
- Part10.Parent = mas
- Part10.CFrame = CFrame.new(1.26990902, 16.9575005, 22.9699402, 1, -4.94467658e-22, 2.08314539e-18, 4.94467658e-22, 1, -5.48416455e-22, -2.08314539e-18, 5.48416455e-22, 1)
- Part10.Position = Vector3.new(1.26990902, 16.9575005, 22.9699402)
- Part10.Transparency = 1
- Part10.Size = Vector3.new(0.75, 2.375, 0.75)
- Part10.CanCollide = false
- Part10.Locked = true
- Part10.FormFactor = Enum.FormFactor.Custom
- Part10.formFactor = Enum.FormFactor.Custom
- Part11.Name = "Right Leg"
- Part11.Parent = mas
- Part11.CFrame = CFrame.new(0.599915028, 15.6175003, 22.7199345, 1, -4.94467658e-22, 2.08314539e-18, 4.94467658e-22, 1, -5.48416455e-22, -2.08314539e-18, 5.48416455e-22, 1)
- Part11.Position = Vector3.new(0.599915028, 15.6175003, 22.7199345)
- Part11.Size = Vector3.new(0.75, 2.375, 0.75)
- Part11.CanCollide = false
- Part11.Locked = true
- Part11.FormFactor = Enum.FormFactor.Custom
- Part11.formFactor = Enum.FormFactor.Custom
- SpecialMesh12.Parent = Part11
- SpecialMesh12.MeshId = "rbxassetid://300344090"
- SpecialMesh12.Scale = Vector3.new(0.850000024, 0.850000024, 0.850000024)
- SpecialMesh12.TextureId = "rbxassetid://300344518"
- SpecialMesh12.MeshType = Enum.MeshType.FileMesh
- Part13.Name = "Torso"
- Part13.Parent = mas
- Part13.CFrame = CFrame.new(0.0999030024, 18.0974998, 22.9599476, 1, -4.94467658e-22, 2.08314539e-18, 4.94467658e-22, 1, -5.48416455e-22, -2.08314539e-18, 5.48416455e-22, 1)
- Part13.Position = Vector3.new(0.0999030024, 18.0974998, 22.9599476)
- Part13.Size = Vector3.new(1.75, 2.625, 0.75)
- Part13.Locked = true
- Part13.FormFactor = Enum.FormFactor.Custom
- Part13.formFactor = Enum.FormFactor.Custom
- SpecialMesh14.Parent = Part13
- SpecialMesh14.MeshId = "rbxassetid://300344229"
- SpecialMesh14.Scale = Vector3.new(0.850000024, 0.850000024, 0.850000024)
- SpecialMesh14.TextureId = "rbxassetid://300344518"
- SpecialMesh14.MeshType = Enum.MeshType.FileMesh
- Motor6D15.Name = "Right Shoulder"
- Motor6D15.Parent = Part13
- Motor6D15.MaxVelocity = 0.15000000596046
- Motor6D15.C0 = CFrame.new(1.35750604, -0.17124939, -0.0525079966, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08)
- Motor6D15.C1 = CFrame.new(0.1875, 0.96875, -0.0625, -4.37113883e-08, -2.31214247e-43, 1, 0, 1, 9.57700864e-30, -1, 0, -4.37113883e-08)
- Motor6D15.Part0 = Part13
- Motor6D15.Part1 = Part10
- Motor6D15.part1 = Part10
- Motor6D16.Name = "Left Hip"
- Motor6D16.Parent = Part13
- Motor6D16.MaxVelocity = 0.15000000596046
- Motor6D16.C0 = CFrame.new(-0.312490016, -1.63624954, -0.0525129735, -4.37113883e-08, 0, -1, 0, 1, 0, 1, 0, -4.37113883e-08)
- Motor6D16.C1 = CFrame.new(0.1875, 0.84375, 0.1875, -4.37113883e-08, -2.4662853e-43, -1, 0, 1, 9.24173583e-30, 1, 0, -4.37113883e-08)
- Motor6D16.Part0 = Part13
- Motor6D16.Part1 = Part8
- Motor6D16.part1 = Part8
- Motor6D17.Name = "Right Hip"
- Motor6D17.Parent = Part13
- Motor6D17.MaxVelocity = 0.15000000596046
- Motor6D17.C0 = CFrame.new(0.68751204, -1.63624954, -0.0525129735, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08)
- Motor6D17.C1 = CFrame.new(0.1875, 0.84375, 0.1875, -4.37113883e-08, -2.4662853e-43, 1, 0, 1, 9.24173583e-30, -1, 0, -4.37113883e-08)
- Motor6D17.Part0 = Part13
- Motor6D17.Part1 = Part11
- Motor6D17.part1 = Part11
- Motor6D18.Name = "Left Shoulder"
- Motor6D18.Parent = Part13
- Motor6D18.MaxVelocity = 0.15000000596046
- Motor6D18.C0 = CFrame.new(-1.18249488, -0.17124939, -0.0525079966, -4.37113883e-08, 0, -1, 0, 1, 0, 1, 0, -4.37113883e-08)
- Motor6D18.C1 = CFrame.new(0.1875, 0.96875, -0.0625, -4.37113883e-08, -2.31214247e-43, -1, 0, 1, 9.57700864e-30, 1, 0, -4.37113883e-08)
- Motor6D18.Part0 = Part13
- Motor6D18.Part1 = Part6
- Motor6D18.part1 = Part6
- Motor6D19.Name = "Neck"
- Motor6D19.Parent = Part13
- Motor6D19.MaxVelocity = 0.15000000596046
- Motor6D19.C0 = CFrame.new(0.43750003, 1.6274972, 0.18749997, 1, 0, 0, 0, -4.37113883e-08, -1, 0, 1, -4.37113883e-08)
- Motor6D19.C1 = CFrame.new(0.4375, 0.497501373, 0.1875, 1, 0, 4.13571789e-30, -2.4662853e-43, -4.37113883e-08, -1, 0, 1, -4.37113883e-08)
- Motor6D19.Part0 = Part13
- Motor6D19.Part1 = Part3
- Motor6D19.part1 = Part3
- Weld2.Parent = Part0
- Weld2.C0 = CFrame.new(-1.26535201, -2.55499506, -0.492372006, 1, 0, 0, 0, 1, 0, 0, 0, 1) --* CFrame.Angles(0,0,-math.rad(180))
- Weld2.C1 = CFrame.new(-1.26535201, -2.78499508, 0.467633992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld2.Part0 = Part10
- Weld2.Part1 = Part0
- Weld2.part1 = Part0
- --Made by Luckymaxer
- Figure = char
- RunService = game:GetService("RunService")
- Humanoid = Figure:WaitForChild("Humanoid")
- Head = Figure:WaitForChild("Head")
- Torso = Figure:WaitForChild("Torso")
- Neck = Motor6D19
- LeftShoulder = Motor6D18
- RightShoulder = Motor6D15
- LeftHip = Motor6D16
- RightHip = Motor6D17
- for i, v in pairs({Neck, LeftShoulder, RightShoulder, LeftHip, RightHip}) do
- if v and v.Parent then
- v.DesiredAngle = 0
- v.CurrentAngle = 0
- end
- end
- Pose = "None"
- LastPose = Pose
- PoseTime = tick()
- ToolAnimTime = 0
- function SetPose(pose)
- LastPose = Pose
- Pose = pose
- PoseTime = tick()
- end
- function OnRunning(Speed)
- if Speed > 0 then
- SetPose("Running")
- else
- SetPose("Standing")
- end
- end
- function OnDied()
- SetPose("Dead")
- end
- function OnJumping()
- SetPose("Jumping")
- end
- function OnClimbing()
- SetPose("Climbing")
- end
- function OnGettingUp()
- SetPose("GettingUp")
- end
- function OnFreeFall()
- SetPose("FreeFall")
- end
- function OnFallingDown()
- SetPose("FallingDown")
- end
- function OnSeated()
- SetPose("Seated")
- end
- function OnPlatformStanding()
- SetPose("PlatformStanding")
- end
- function OnSwimming(Speed)
- return OnRunning(Speed)
- end
- function MoveJump()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder.DesiredAngle = math.pi
- LeftShoulder.DesiredAngle = -math.pi
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function MoveFreeFall()
- RightShoulder.MaxVelocity = 0.25
- LeftShoulder.MaxVelocity = 0.25
- RightShoulder.DesiredAngle = math.pi
- LeftShoulder.DesiredAngle = -math.pi
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function MoveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder.DesiredAngle = (math.pi / 2)
- LeftShoulder.DesiredAngle = -(math.pi / 2)
- RightHip.DesiredAngle = 1
- LeftHip.DesiredAngle = -1
- end
- function GetTool()
- for i, v in pairs(Figure:GetChildren()) do
- if v:IsA("Tool") then
- return v
- end
- end
- end
- function GetToolAnim(Tool)
- for i, v in pairs(Tool:GetChildren()) do
- if v:IsA("StringValue") and v.Name == "ToolAnim" then
- return v
- end
- end
- return nil
- end
- function AnimateTool()
- if (ToolAnim == "None") then
- return
- end
- if (ToolAnim == "Slash") then
- RightShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 0
- return
- end
- if (ToolAnim == "Lunge") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightHip.MaxVelocity = 0.5
- LeftHip.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = (math.pi / 2)
- LeftShoulder.DesiredAngle = 0
- RightHip.DesiredAngle = (math.pi / 2)
- LeftHip.DesiredAngle = 1
- return
- end
- end
- function Move(Time)
- local LimbAmplitude
- local LimbFrequency
- local NeckAmplitude
- local NeckFrequency
- local NeckDesiredAngle
- if (Pose == "Jumping") then
- MoveJump()
- return
- elseif (Pose == "FreeFall") then
- MoveFreeFall()
- return
- elseif (Pose == "Seated") then
- MoveSit()
- return
- end
- local ClimbFudge = 0
- if (Pose == "Running") then
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- LimbAmplitude = 1
- LimbFrequency = 9
- NeckAmplitude = 0
- NeckFrequency = 0
- NeckDesiredAngle = 0
- --[[if Creator and Creator.Value and Creator.Value:IsA("Player") and Creator.Value.Character then
- local CreatorCharacter = Creator.Value.Character
- local CreatorHead = CreatorCharacter:FindFirstChild("Head")
- if CreatorHead then
- local TargetPosition = CreatorHead.Position
- local Direction = Torso.CFrame.lookVector
- local HeadPosition = Head.Position
- NeckDesiredAngle = ((((HeadPosition - TargetPosition).Unit):Cross(Direction)).Y / 4)
- end
- end]]
- elseif (Pose == "Climbing") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- LimbAmplitude = 1
- LimbFrequency = 9
- NeckAmplitude = 0
- NeckFrequency = 0
- NeckDesiredAngle = 0
- ClimbFudge = math.pi
- else
- LimbAmplitude = 0.1
- LimbFrequency = 1
- NeckAmplitude = 0.25
- NeckFrequency = 1.25
- end
- NeckDesiredAngle = ((not NeckDesiredAngle and (NeckAmplitude * math.sin(Time * NeckFrequency))) or NeckDesiredAngle)
- LimbDesiredAngle = (LimbAmplitude * math.sin(Time * LimbFrequency))
- --Neck.DesiredAngle = NeckDesiredAngle
- RightShoulder.DesiredAngle = (LimbDesiredAngle + ClimbFudge)
- LeftShoulder.DesiredAngle = (LimbDesiredAngle - ClimbFudge)
- RightHip.DesiredAngle = -LimbDesiredAngle
- LeftHip.DesiredAngle = -LimbDesiredAngle
- local Tool = GetTool()
- if Tool then
- AnimStringValueObject = GetToolAnim(Tool)
- if AnimStringValueObject then
- ToolAnim = AnimStringValueObject.Value
- if AnimStringValueObject and AnimStringValueObject.Parent then
- AnimStringValueObject:Destroy()
- end
- ToolAnimTime = (Time + 0.3)
- end
- if Time > ToolAnimTime then
- ToolAnimTime = 0
- ToolAnim = "None"
- end
- AnimateTool()
- else
- ToolAnim = "None"
- ToolAnimTime = 0
- end
- end
- Humanoid.Died:connect(OnDied)
- Humanoid.Running:connect(OnRunning)
- Humanoid.Jumping:connect(OnJumping)
- Humanoid.Climbing:connect(OnClimbing)
- Humanoid.GettingUp:connect(OnGettingUp)
- Humanoid.FreeFalling:connect(OnFreeFall)
- Humanoid.FallingDown:connect(OnFallingDown)
- Humanoid.Seated:connect(OnSeated)
- Humanoid.PlatformStanding:connect(OnPlatformStanding)
- Humanoid.Swimming:connect(OnSwimming)
- Humanoid:ChangeState(Enum.HumanoidStateType.None)
- RunService.Stepped:connect(function()
- local _, Time = wait(0.1)
- Move(Time)
- end)
Add Comment
Please, Sign In to add comment