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
- Plr = owner
- Char = Plr.Character
- Create = Instance.new
- local shadowhead = Create("Part",Char.Head)
- shadowhead.BrickColor = BrickColor.new("Really black")
- shadowhead.Size = Vector3.new(1.2, 0.6, 1)
- shadowhead.CanCollide = false
- local shadowheadmesh = Create("SpecialMesh",shadowhead)
- shadowheadmesh.MeshType = "Head"
- shadowheadmesh.Scale = Vector3.new(1.26, 1.5, 1.26)
- local weld2 = Create("Weld",shadowhead)
- weld2.Part0 = shadowhead
- weld2.Part1 = Char.Head
- weld2.C1 = CFrame.new(0, 0.200000048, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Char.Head:FindFirstChildOfClass("Decal").Texture = "http://www.roblox.com/asset/?id=753559068"
- local Song = Create("Sound",Char.Head)
- Song.SoundId = "rbxassetid://492070484"
- Song.Volume = 2
- Song.Looped = true
- Song:Play()
- 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 = 3.7
- walk = 1
- tilt = 1
- animateing = false
- deb = false
- hrw = wbtwe(owner.Character.Torso, owner.Character.HumanoidRootPart, CFrame.new(0, 0, 0))
- law = wbtwe(owner.Character["Left Arm"], owner.Character.Torso, CFrame.new(0.4, 0, 0.8) *CFrame.Angles(0, 25, math.sin(-3.7) *3))
- raw = wbtwe(owner.Character["Right Arm"], owner.Character.Torso, CFrame.new(-0.4, 0, 1.2) *CFrame.Angles(0, 0, math.sin(3.7) *3))
- 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.45, 0) *CFrame.Angles(0, 0, 0))
- light = Create("Part", owner.Character)
- light.BrickColor = BrickColor.new("Institutional white")
- light.Material = "Neon"
- light.Shape = "Ball"
- light.Size = Vector3.new(7, 7, 7)
- light.CanCollide = false
- light.Anchored = true
- light.CFrame = owner.Character.HumanoidRootPart.CFrame *CFrame.new(4, 4, 5)
- attacktaunt = Create("Sound", owner.Character.Head)
- attacktaunt.Volume = 4
- attacktaunt.SoundId = "rbxassetid://1718412034"
- stomp = Create("Sound", owner.Character["Left Leg"])
- stomp.SoundId = "rbxassetid://168514932"
- stomp.Volume = 2
- an = coroutine.wrap(function()
- while wait() do
- if Char.HumanoidRootPart.Velocity.Magnitude < 1 then
- for i = 0,1,0.1 do
- if animateing == false then
- idle = idle +0.1
- game:GetService("RunService").Stepped:wait()
- hrw.C0 = hrw.C0:lerp(owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.new(0, math.sin(idle) *0.3, 0), 0.1)
- law.C0 = law.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0.4, 0, 0.8) *CFrame.Angles(0, 25, math.sin(-3.7) *3), 0.1)
- raw.C0 = raw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(-0.4, 0, 1.2) *CFrame.Angles(0, 0, math.sin(3.7) *3), 0.1)
- llw.C0 = llw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0.45, 2.1, 0) *CFrame.Angles(0, 25, 0), 0.1)
- rlw.C0 = rlw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(-0.4, 2.1, 0) *CFrame.Angles(0, 0, 0), 0.1)
- hw.C0 = hw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0, -1.45, 0) *CFrame.Angles(0, 0, 0), 0.1)
- end
- end
- end
- if Char.HumanoidRootPart.Velocity.Magnitude > 1 then
- for i = 0,1,0.1 do
- if animateing == false then
- walk = walk +0.1
- tilt = tilt +0.09
- game:GetService("RunService").Stepped:wait()
- law.C0 = law.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(1.45, 0, 0) *CFrame.Angles(math.sin(walk) *1, 25, 0), 0.1)
- raw.C0 = raw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(-1.4, 0, 0) *CFrame.Angles(math.sin(-walk) *1, 0, 0), 0.1)
- llw.C0 = llw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0.45, 2.1, 0) *CFrame.Angles(math.sin(-walk) *1, 25, 0), 0.1)
- rlw.C0 = rlw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(-0.4, 2.1, 0) *CFrame.Angles(math.sin(walk) *1, 0, 0), 0.1)
- hrw.C0 = hrw.C0:lerp(owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.new(0, 0, 0) *CFrame.Angles(0, math.sin(tilt) *0.3, 0), 0.6)
- end
- end
- end
- end
- end)
- an()
- lightfollow = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- for i = 0,1,0.1 do
- game:GetService("RunService").Stepped:wait()
- light.CFrame = light.CFrame:lerp(owner.Character.HumanoidRootPart.CFrame *CFrame.new(4, 4, 5), 0.1)
- end
- end
- end)
- lightfollow()
- mouse.KeyDown:connect(function(k)
- if k == "e" then
- if deb == false then
- if mouse.Target then
- deb = true
- attacktaunt:Play()
- animateing = true
- Char.Humanoid.WalkSpeed = 6
- for i = 0,1,0.06 do
- game:GetService("RunService").Stepped:wait()
- hrw.C0 = hrw.C0:lerp(owner.Character.HumanoidRootPart.CFrame:inverse() *owner.Character.HumanoidRootPart.CFrame *CFrame.new(0, 0, 0) *CFrame.Angles(0, 0, 0), 0.6)
- hw.C0 = hw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0, -1.4, 0.6) *CFrame.Angles(-0.6, 0, 0), 0.1)
- law.C0 = law.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(1.45, 0.3, 0.1) *CFrame.Angles(0, 25, 0.06), 0.1)
- raw.C0 = raw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(-1.4, 0.3, 0) *CFrame.Angles(0, 25, -0.06), 0.1)
- llw.C0 = llw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0.45, 1.7, 0.2) *CFrame.Angles(0, 25, 0), 0.1)
- rlw.C0 = rlw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(-0.4, 2.1, 0) *CFrame.Angles(0, 0, 0), 0.1)
- end
- stomp:Play()
- for i = 0,1,0.06 do
- game:GetService("RunService").Stepped:wait()
- hw.C0 = hw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0, -1.4, -0.6) *CFrame.Angles(0.6, 0, 0), 0.1)
- llw.C0 = llw.C0:lerp(owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0.45, 2.1, 1) *CFrame.Angles(0, 25, 0), 0.1)
- end
- local attack = Instance.new("Part", workspace)
- attack.Anchored = true
- attack.Shape = "Ball"
- attack.BrickColor = BrickColor.new("Institutional white")
- attack.Size = Vector3.new(5, 5, 5)
- attack.CanCollide = false
- attack.Position = mouse.Hit.p +Vector3.new(0, 10, 0)
- attack.Material = "Neon"
- attack.CastShadow = false
- attack.Touched:connect(function(p)
- if p.Parent:FindFirstChildOfClass("Humanoid") then
- if p.Parent.Name ~= Plr.Name then
- p.Parent:BreakJoints()
- end
- end
- end)
- Char.Humanoid.WalkSpeed = 16
- animateing = false
- deb = false
- for i = 1,50 do
- game:GetService("RunService").Stepped:wait()
- attack.Size = attack.Size +Vector3.new(1, 1, 1)
- attack.Transparency = attack.Transparency +0.04
- end
- attack:Destroy()
- end
- end
- end
- if k == "t" then
- if deb == false then
- deb = true
- for i = 1,20 do
- game:GetService("RunService").Stepped:wait()
- light.Transparency = light.Transparency +0.05
- light.Size = light.Size +Vector3.new(1, 1, 1)
- end
- owner.Character:MoveTo(mouse.Hit.p)
- for i = 1,20 do
- game:GetService("RunService").Stepped:wait()
- light.Transparency = light.Transparency -0.05
- light.Size = light.Size -Vector3.new(1, 1, 1)
- end
- deb = false
- end
- end
- end)
Add Comment
Please, Sign In to add comment