Advertisement
teotv202

Kicking Script

Jun 3rd, 2019
526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.33 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do 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
  5. Player = owner
  6. mouse = Player:GetMouse()
  7. used = false
  8. attacking = false
  9. smashing = false
  10. kick = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
  11. kick.SoundId = "rbxassetid://507150998"
  12. kick.Volume = 6
  13. kick1 = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
  14. kick1.SoundId = "rbxassetid://169380525"
  15. kick1.Volume = 6
  16. kick11 = Instance.new("Sound", game.Players.LocalPlayer.Character["Right Leg"])
  17. kick11.SoundId = "rbxassetid://165969964"
  18. kick11.Volume = 50
  19. function sensor(key)
  20.  key = key:lower()
  21.  if key == "e" then
  22.   if not used then
  23.   used = true
  24.   local detect = Instance.new("Part", game.Players.LocalPlayer.Character)
  25.   detect.Size = Vector3.new(1,1,4)
  26.   detect:BreakJoints()
  27.   detect.CanCollide = false
  28.   detect.Transparency = 0.9
  29.   detect.BrickColor = BrickColor.new("Really red")
  30.   local weld = Instance.new("Weld", detect)
  31.   weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  32.   weld.Part1 = detect
  33.   weld.C0 = weld.C0 * CFrame.new(0,-1,0)
  34.   local function attack(part)
  35.    if not attacking then
  36.     attacking = true
  37.     local torso = part.Parent:findFirstChild("Torso")
  38.     if torso ~= nil then
  39.      local humanoid = part.Parent:findFirstChild("Humanoid")
  40.      if humanoid ~= nil then
  41.       local weld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  42.       humanoid.WalkSpeed = 0
  43.       humanoid.JumpPower = 0
  44.       game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
  45.       game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
  46.       for i = 1,5 do
  47.        wait()
  48.        game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  49.        game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  50.        game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,0.2)
  51.        game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,0.2)
  52.        game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(-0.2,0,0)
  53.       end
  54.       kick:Play()
  55.       used = true
  56.       local bodyvelocity = Instance.new("BodyVelocity", torso)
  57.       bodyvelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 67
  58.       bodyvelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  59.       wait(1.4)
  60.       local bodyposition = Instance.new("BodyPosition", torso)
  61.       bodyposition.Position = torso.Position
  62.       bodyposition.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  63.       bodyvelocity:destroy()
  64.       wait(1)
  65.       for i = 1,5 do
  66.        wait()
  67.        game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  68.        game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  69.        game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,-0.2)
  70.        game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,-0.2)
  71.        game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0.2,0,0)
  72.       end
  73.       for i = 1,5 do
  74.        wait()
  75.        game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  76.        game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  77.        game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,0.2)
  78.        game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,-0.2)
  79.        game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0.2,0,0)
  80.       end
  81.       wait(1)
  82.       for i = 1,5 do
  83.        wait()
  84.        game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  85.        game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  86.        game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 * CFrame.Angles(0,0,-0.1)
  87.        game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 * CFrame.Angles(0,0,0.1)
  88.        game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(-0.1,0,0)
  89.       end
  90.       local bodypositionme = Instance.new("BodyPosition", game.Players.LocalPlayer.Character.Torso)
  91.       bodypositionme.Position = torso.Position
  92.       bodypositionme.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  93.       wait(1.1)
  94.       for i = 1,5 do
  95.        game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0,0,0.25)
  96.        game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.25)
  97.       end
  98.       kick1:Play()
  99.                         bodypositionme:destroy()
  100.                         local torsowelding = Instance.new("Weld", torso)
  101.                         torsowelding.Part0 = torso
  102.                         torsowelding.Part1 = game.Players.LocalPlayer.Character.Torso
  103.                         torsowelding.C0 = torsowelding.C0 * CFrame.new(0,0,-2)
  104.                         torsowelding.C0 = torsowelding.C0 * CFrame.Angles(0,3.08,0)
  105.                         wait(1.3)
  106.                         torsowelding:destroy()
  107.                         bodyposition:destroy()
  108.                         local mybodyvel = Instance.new("BodyVelocity", game.Players.LocalPlayer.Character.Torso)
  109.                         mybodyvel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * -90
  110.                         mybodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  111.                         local bodyvel = Instance.new("BodyVelocity", torso)
  112.                         bodyvel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 80
  113.                         bodyvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  114.                         humanoid.PlatformStand = true
  115.                         wait(0.3)
  116.                         bodyvel:destroy()
  117.                         mybodyvel:destroy()
  118.                         wait(0.25)
  119.                         game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  120.                         game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  121.                         game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  122.                         game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  123.                         game.Players.LocalPlayer.Character.Torso["Left Hip"].C0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  124.                         game.Players.LocalPlayer.Character.Torso["Right Hip"].C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  125.                         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  126.                game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50
  127.                         wait(2.5)
  128.                         local block = Instance.new("Part", workspace)
  129.                         block.Position = torso.Position + Vector3.new(0,500,0)
  130.                         block.Size = Vector3.new(50,70,50)
  131.                         local function smash()
  132.                      if not smashing then
  133.                   smashing = true
  134.                   local explosion = Instance.new("Explosion", block)
  135.                   explosion.BlastRadius = 999999999
  136.                   humanoid.Health = 0
  137.                   kick11:Play()
  138.                   explosion.Position = torso.Position
  139.                   wait(1)
  140.                   smashing = false
  141.                      end
  142.                         end
  143.                         block.Touched:connect(smash)
  144.                         used = false
  145.                         attacking = false
  146.                         wait(7)
  147.                         block:destroy()
  148.                      end
  149.     end
  150.     wait(1)
  151.     attacking = false
  152.    end
  153.   end
  154.   detect.Touched:connect(attack)
  155.   wait(0.4)
  156.   detect:destroy()
  157.   used = false
  158.   end
  159.  end
  160. end
  161. mouse.KeyDown:connect(sensor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement