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
- do
- 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
- function rayCast(Position, Direction, Range, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
- end
- local Player_Size = 1
- function wbtwe(Part0, Part1, C0)
- local weld = Instance.new("Weld", Part0)
- weld.Part0 = Part0
- weld.Part1 = Part1
- weld.C0 = Part1.CFrame:inverse() *Part1.CFrame *C0
- return weld
- end
- idle = 1
- walk = 1
- deb = false
- animt = true
- hrw = wbtwe(owner.Character.Torso, owner.Character.HumanoidRootPart, CFrame.new(0, 0, 0) *CFrame.Angles(0, 0, 0))
- law = wbtwe(owner.Character["Left Arm"], owner.Character.Torso, CFrame.new(1.5, 0.2, 0) *CFrame.Angles(0, 25, 0.2))
- raw = wbtwe(owner.Character["Right Arm"], owner.Character.Torso, CFrame.new(-1.5, 0.2, 0) *CFrame.Angles(0, 0, -0.2))
- llw = wbtwe(owner.Character["Left Leg"], owner.Character.HumanoidRootPart, CFrame.new(0.45, 2.1, 0) *CFrame.Angles(0, 25, 0))
- rlw = wbtwe(owner.Character["Right Leg"], owner.Character.HumanoidRootPart, CFrame.new(-0.4, 2.1, 0) *CFrame.Angles(0, 0, 0))
- hw = wbtwe(owner.Character.Head, owner.Character.Torso, CFrame.new(0, -1.5, 0) *CFrame.Angles(0, 0, 0))
- local sign = Instance.new("BillboardGui", owner.Character.Head)
- sign.Parent = owner.Character.Head
- sign.StudsOffset=Vector3.new(0.5,1,0)
- sign.Size=UDim2.new(3,0,6,0)
- text=Instance.new("TextLabel")
- text.Text= "Rainbow"
- text.TextScaled = true
- text.TextColor3 = Color3.new(1, 1, 1)
- text.Size=UDim2.new(1,0,1,0)
- text.Position=UDim2.new(-0.125,0,-0.25,0)
- text.BackgroundTransparency = 1
- text.Font = "Fantasy"
- text.Parent=sign
- local song = Instance.new("Sound", owner.Character.Head)
- song.SoundId = "rbxassetid://864793052"
- song.Volume = 4
- song.Looped = true
- song:Play()
- local trail = Instance.new("Trail")
- trail.Parent = owner.Character
- trail.Transparency = NumberSequence.new(0, 1)
- local att0 = Instance.new("Attachment", owner.Character.Head)
- local att1 = Instance.new("Attachment", owner.Character.HumanoidRootPart)
- trail.Attachment0=att0
- trail.Attachment1=att1
- trail.Texture = "rbxassetid://1463504275"
- trail.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.new(0.839,0,0)),ColorSequenceKeypoint.new(0.111, Color3.new(1,0.624,0.02)),ColorSequenceKeypoint.new(0.248, Color3.new(1,1,0.047)),ColorSequenceKeypoint.new(0.388, Color3.new(0.278,1,0.325)),ColorSequenceKeypoint.new(0.547, Color3.new(0.341,1,0.925)),ColorSequenceKeypoint.new(0.712, Color3.new(0.251,0.302,1)),ColorSequenceKeypoint.new(0.864, Color3.new(0.686,0.243,1)),ColorSequenceKeypoint.new(0.997, Color3.new(1,0.655,0.851)),ColorSequenceKeypoint.new(1, Color3.new(1,1,1))})
- owner.Character.Humanoid.WalkSpeed = 9
- spawn(function()
- local TweenService = game:GetService("TweenService")
- local Colours = {Color3.fromRGB(255,0,0),Color3.fromRGB(255,255,0),Color3.fromRGB(0,255,0),Color3.fromRGB(0,0,255),Color3.fromRGB(170,0,170)}
- local Int = 0
- while wait(0.2) do
- if Int == #Colours then Int = 0 end
- Int = Int+1
- TweenService:Create(text,TweenInfo.new(0.4),{TextColor3 = Colours[Int]}):Play()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "a" then
- hrw.C0 = owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.Angles(0.05, 0, 0.1)
- end
- if key == "d" then
- hrw.C0 = owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.Angles(0.05, 0, -0.1)
- end
- end)
- anim = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- if owner.Character.HumanoidRootPart.Velocity.Magnitude > 1 then
- hitfloor, posfloor = rayCast(owner.Character.HumanoidRootPart.Position, CFrame.new(owner.Character.HumanoidRootPart.Position, owner.Character.HumanoidRootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4 * Player_Size, owner.Character)
- if hitfloor then
- walk = walk +0.4
- hrw.C0 = hrw.C0:lerp(owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.new(0, 0, 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
- 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
- function rayCast(Position, Direction, Range, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
- end
- local Player_Size = 1
- function wbtwe(Part0, Part1, C0)
- local weld = Instance.new("Weld", Part0)
- weld.Part0 = Part0
- weld.Part1 = Part1
- weld.C0 = Part1.CFrame:inverse() *Part1.CFrame *C0
- return weld
- end
- idle = 1
- walk = 1
- deb = false
- animt = true
- hrw = wbtwe(owner.Character.Torso, owner.Character.HumanoidRootPart, CFrame.new(0, 0, 0) *CFrame.Angles(0, 0, 0))
- law = wbtwe(owner.Character["Left Arm"], owner.Character.Torso, CFrame.new(1.5, 0.2, 0) *CFrame.Angles(0, 25, 0.2))
- raw = wbtwe(owner.Character["Right Arm"], owner.Character.Torso, CFrame.new(-1.5, 0.2, 0) *CFrame.Angles(0, 0, -0.2))
- llw = wbtwe(owner.Character["Left Leg"], owner.Character.HumanoidRootPart, CFrame.new(0.45, 2.1, 0) *CFrame.Angles(0, 25, 0))
- rlw = wbtwe(owner.Character["Right Leg"], owner.Character.HumanoidRootPart, CFrame.new(-0.4, 2.1, 0) *CFrame.Angles(0, 0, 0))
- hw = wbtwe(owner.Character.Head, owner.Character.Torso, CFrame.new(0, -1.5, 0) *CFrame.Angles(0, 0, 0))
- local sign = Instance.new("BillboardGui", owner.Character.Head)
- sign.Parent = owner.Character.Head
- sign.StudsOffset=Vector3.new(0.5,1,0)
- sign.Size=UDim2.new(3,0,6,0)
- text=Instance.new("TextLabel")
- text.Text= "Rainbow"
- text.TextScaled = true
- text.TextColor3 = Color3.new(1, 1, 1)
- text.Size=UDim2.new(1,0,1,0)
- text.Position=UDim2.new(-0.125,0,-0.25,0)
- text.BackgroundTransparency = 1
- text.Font = "Fantasy"
- text.Parent=sign
- local song = Instance.new("Sound", owner.Character.Head)
- song.SoundId = "rbxassetid://864793052"
- song.Volume = 4
- song.Looped = true
- song:Play()
- local trail = Instance.new("Trail")
- trail.Parent = owner.Character
- trail.Transparency = NumberSequence.new(0, 1)
- local att0 = Instance.new("Attachment", owner.Character.Head)
- local att1 = Instance.new("Attachment", owner.Character.HumanoidRootPart)
- trail.Attachment0=att0
- trail.Attachment1=att1
- trail.Texture = "rbxassetid://1463504275"
- trail.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.new(0.839,0,0)),ColorSequenceKeypoint.new(0.111, Color3.new(1,0.624,0.02)),ColorSequenceKeypoint.new(0.248, Color3.new(1,1,0.047)),ColorSequenceKeypoint.new(0.388, Color3.new(0.278,1,0.325)),ColorSequenceKeypoint.new(0.547, Color3.new(0.341,1,0.925)),ColorSequenceKeypoint.new(0.712, Color3.new(0.251,0.302,1)),ColorSequenceKeypoint.new(0.864, Color3.new(0.686,0.243,1)),ColorSequenceKeypoint.new(0.997, Color3.new(1,0.655,0.851)),ColorSequenceKeypoint.new(1, Color3.new(1,1,1))})
- owner.Character.Humanoid.WalkSpeed = 9
- spawn(function()
- local TweenService = game:GetService("TweenService")
- local Colours = {Color3.fromRGB(255,0,0),Color3.fromRGB(255,255,0),Color3.fromRGB(0,255,0),Color3.fromRGB(0,0,255),Color3.fromRGB(170,0,170)}
- local Int = 0
- while wait(0.2) do
- if Int == #Colours then Int = 0 end
- Int = Int+1
- TweenService:Create(text,TweenInfo.new(0.4),{TextColor3 = Colours[Int]}):Play()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "a" then
- hrw.C0 = owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.Angles(0.05, 0, 0.1)
- end
- if key == "d" then
- hrw.C0 = owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.Angles(0.05, 0, -0.1)
- end
- end)
- anim = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- if owner.Character.HumanoidRootPart.Velocity.Magnitude > 1 then
- hitfloor, posfloor = rayCast(owner.Character.HumanoidRootPart.Position, CFrame.new(owner.Character.HumanoidRootPart.Position, owner.Character.HumanoidRootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4 * Player_Size, owner.Character)
- if hitfloor then
- walk = walk +0.4
- hrw.C0 = hrw.C0:lerp(owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.new(0, 0, 0.05) *CFrame.Angles(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
- 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
- function rayCast(Position, Direction, Range, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
- end
- local Player_Size = 1
- function wbtwe(Part0, Part1, C0)
- local weld = Instance.new("Weld", Part0)
- weld.Part0 = Part0
- weld.Part1 = Part1
- weld.C0 = Part1.CFrame:inverse() *Part1.CFrame *C0
- return weld
- end
- idle = 1
- walk = 1
- deb = false
- animt = true
- hrw = wbtwe(owner.Character.Torso, owner.Character.HumanoidRootPart, CFrame.new(0, 0, 0) *CFrame.Angles(0, 0, 0))
- law = wbtwe(owner.Character["Left Arm"], owner.Character.Torso, CFrame.new(1.5, 0.2, 0) *CFrame.Angles(0, 25, 0.2))
- raw = wbtwe(owner.Character["Right Arm"], owner.Character.Torso, CFrame.new(-1.5, 0.2, 0) *CFrame.Angles(0, 0, -0.2))
- llw = wbtwe(owner.Character["Left Leg"], owner.Character.HumanoidRootPart, CFrame.new(0.45, 2.1, 0) *CFrame.Angles(0, 25, 0))
- rlw = wbtwe(owner.Character["Right Leg"], owner.Character.HumanoidRootPart, CFrame.new(-0.4, 2.1, 0) *CFrame.Angles(0, 0, 0))
- hw = wbtwe(owner.Character.Head, owner.Character.Torso, CFrame.new(0, -1.5, 0) *CFrame.Angles(0, 0, 0))
- local sign = Instance.new("BillboardGui", owner.Character.Head)
- sign.Parent = owner.Character.Head
- sign.StudsOffset=Vector3.new(0.5,1,0)
- sign.Size=UDim2.new(3,0,6,0)
- text=Instance.new("TextLabel")
- text.Text= "Rainbow"
- text.TextScaled = true
- text.TextColor3 = Color3.new(1, 1, 1)
- text.Size=UDim2.new(1,0,1,0)
- text.Position=UDim2.new(-0.125,0,-0.25,0)
- text.BackgroundTransparency = 1
- text.Font = "Fantasy"
- text.Parent=sign
- local song = Instance.new("Sound", owner.Character.Head)
- song.SoundId = "rbxassetid://864793052"
- song.Volume = 4
- song.Looped = true
- song:Play()
- local trail = Instance.new("Trail")
- trail.Parent = owner.Character
- trail.Transparency = NumberSequence.new(0, 1)
- local att0 = Instance.new("Attachment", owner.Character.Head)
- local att1 = Instance.new("Attachment", owner.Character.HumanoidRootPart)
- trail.Attachment0=att0
- trail.Attachment1=att1
- trail.Texture = "rbxassetid://1463504275"
- trail.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.new(0.839,0,0)),ColorSequenceKeypoint.new(0.111, Color3.new(1,0.624,0.02)),ColorSequenceKeypoint.new(0.248, Color3.new(1,1,0.047)),ColorSequenceKeypoint.new(0.388, Color3.new(0.278,1,0.325)),ColorSequenceKeypoint.new(0.547, Color3.new(0.341,1,0.925)),ColorSequenceKeypoint.new(0.712, Color3.new(0.251,0.302,1)),ColorSequenceKeypoint.new(0.864, Color3.new(0.686,0.243,1)),ColorSequenceKeypoint.new(0.997, Color3.new(1,0.655,0.851)),ColorSequenceKeypoint.new(1, Color3.new(1,1,1))})
- owner.Character.Humanoid.WalkSpeed = 9
- spawn(function()
- local TweenService = game:GetService("TweenService")
- local Colours = {Color3.fromRGB(255,0,0),Color3.fromRGB(255,255,0),Color3.fromRGB(0,255,0),Color3.fromRGB(0,0,255),Color3.fromRGB(170,0,170)}
- local Int = 0
- while wait(0.2) do
- if Int == #Colours then Int = 0 end
- Int = Int+1
- TweenService:Create(text,TweenInfo.new(0.4),{TextColor3 = Colours[Int]}):Play()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "a" then
- hrw.C0 = owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.Angles(0.05, 0, 0.1)
- end
- if key == "d" then
- hrw.C0 = owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.Angles(0.05, 0, -0.1)
- end
- end)
- anim = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- if owner.Character.HumanoidRootPart.Velocity.Magnitude > 1 then
- hitfloor, posfloor = rayCast(owner.Character.HumanoidRootPart.Position, CFrame.new(owner.Character.HumanoidRootPart.Position, owner.Character.HumanoidRootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4 * Player_Size, owner.Character)
- if hitfloor then
- walk = walk +0.4
- hrw.C0 = hrw.C0:lerp(owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.new(0, 0, 0.05) *CFrame.Angles(0.2, 0, 0), 0.2)
- hw.C0 = hw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0, -1.5, 0) *CFrame.Angles(0, 0, 0), 0.2)
- end
- if hitfloor == nil then
- end
- end
- end
- end)anim()
- health = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- owner.Character.Humanoid.MaxHealth = math.huge
- owner.Character.Humanoid.Health = math.huge
- end
- end)health(), 0, 0), 0.2)
- hw.C0 = hw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0, -1.5, 0) *CFrame.Angles(0, 0, 0), 0.2)
- end
- if hitfloor == nil then
- end
- end
- end
- end)anim()
- health = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- owner.Character.Humanoid.MaxHealth = math.huge
- owner.Character.Humanoid.Health = math.huge
- end
- end)health()) *CFrame.Angles(0.2, 0, 0), 0.2)
- hw.C0 = hw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0, -1.5, 0) *CFrame.Angles(0, 0, 0), 0.2)
- end
- if hitfloor == nil then
- end
- end
- end
- end)anim()
- health = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- owner.Character.Humanoid.MaxHealth = math.huge
- owner.Character.Humanoid.Health = math.huge
- end
- end)health()
Add Comment
Please, Sign In to add comment