Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- 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 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
- -----------------------------------------------
- Player = game:GetService("Players").LocalPlayer
- Char = Player.Character
- Mouse = Player:GetMouse()
- attacking = false
- local tweenService = game:GetService("TweenService")
- local num = 1
- -----------------------------------------------
- Head = Char.Head
- Torso = Char.Torso
- LArm = Char:FindFirstChild("Left Arm")
- LLeg = Char:FindFirstChild("Left Leg")
- RArm = Char:FindFirstChild("Right Arm")
- RLeg = Char:FindFirstChild("Right Leg")
- -----------------------------------------------
- Mouse.KeyDown:connect(function(key)
- if key:lower() == "e" and attacking == false then
- attacking = true
- Torso.Anchored = true
- for i = 1, 30, 3 do
- wait(0.01)
- local Part = Instance.new("Part", game.workspace)
- Part.Material = "Glass"
- Part.Color = Color3.fromRGB(196, 40, 28)
- Part.Transparency = 0.7
- Part.Name = "Part"..num
- Part.Size = Vector3.new(10,1,3)
- Part.Size = Part.Size + Vector3.new(i,0,0)
- Part.Anchored = true
- Part.CFrame = Char.Torso.CFrame * CFrame.new(0,-3,-3 - i)
- num = num + 1
- Part.Touched:connect(function(Plr)
- if Plr.Parent.Humanoid then
- Plr.Parent:FindFirstChild("Humanoid"):TakeDamage(9999999)
- end
- end)
- end
- wait()
- for i = 1, 10, 1 do
- wait(0.01)
- game.workspace:FindFirstChild("Part"..i):Destroy()
- end
- num = 1
- Torso.Anchored = false
- attacking = false
- end
- if key:lower() == "c" and attacking == false then
- attacking = true
- local Grenade = Instance.new("Part")
- local throwPower = 100
- Grenade.CFrame = Head.CFrame * CFrame.new(0,0,-2)
- Grenade.Parent = game.Workspace
- Grenade.Velocity = Char.Torso.CFrame.lookVector * throwPower
- Grenade.CanCollide = true
- wait(2)
- Grenade.CanCollide =false
- Grenade.Anchored = true
- local Area = Instance.new("Part", Grenade)
- Area.Anchored = true
- Area.Shape = "Cylinder"
- Area.CanCollide = false
- Area.Color = Color3.fromRGB(196, 40, 28)
- Area.Transparency = 0.7
- Area.Color = Color3.fromRGB(196, 40, 28)
- Area.Size = Vector3.new(0.2, 0, 0)
- Area.CFrame = Grenade.CFrame * CFrame.new(0,-0.5,0)
- Area.CFrame = Area.CFrame * CFrame.Angles(0,0,math.rad(90))
- local tweenInformation = TweenInfo.new (
- 2,
- Enum.EasingStyle.Quad,
- Enum.EasingDirection.Out,
- 0,
- false,
- 0
- )
- local partProperties = {
- Size = Vector3.new(0.2, 70, 70)
- }
- local Explosion = tweenService:Create(Area,tweenInformation,partProperties)
- Explosion:Play()
- wait(2)
- Area.Touched:connect(function(Plr)
- print(Plr)
- if Plr.Parent.Humanoid then
- Plr.Parent:FindFirstChild("Humanoid"):TakeDamage(9999999)
- else
- Plr:Destroy()
- end
- end)
- wait(.5)
- Area:Destroy()
- Grenade:Destroy()
- attacking = false
- end
- if key:lower() == "q" and attacking == false then
- if Mouse.Target.Parent:FindFirstChild("Humanoid") then
- attacking = true
- local T = Mouse.Target.Parent.Torso
- T.Anchored = true
- local Cyl = Instance.new("Part", game.workspace)
- Cyl.Anchored = true
- Cyl.Shape = "Cylinder"
- Cyl.CanCollide = false
- Cyl.Color = Color3.fromRGB(196, 40, 28)
- Cyl.Transparency = 0.7
- Cyl.Size = Vector3.new(.1,1,2)
- Cyl.CFrame = T.CFrame * CFrame.new(0,-3,0)
- Cyl.CFrame = Cyl.CFrame * CFrame.Angles(0,0,math.rad(90))
- local tweenInformation = TweenInfo.new (
- 5,
- Enum.EasingStyle.Quad,
- Enum.EasingDirection.Out,
- 0,
- false,
- 0
- )
- local partProperties = {
- Size = Vector3.new(0.1,5,5)
- }
- local BloodOut = tweenService:Create(Cyl,tweenInformation,partProperties)
- BloodOut:Play()
- local explosion = Instance.new("Explosion")
- explosion.BlastPressure = 0
- explosion.DestroyJointRadiusPercent = 0
- explosion.BlastRadius = 0
- explosion.DestroyJointRadiusPercent = 0
- explosion.Position = T.Parent.Head.Position
- wait(5)
- explosion.Parent = T.Parent.Head
- T.Parent.Head.Transparency = 1
- if T.Parent.Head:FindFirstChild("face") then
- T.Parent.Head.face:Destroy()
- end
- wait(0.5)
- local tweenInformation = TweenInfo.new (
- 3,
- Enum.EasingStyle.Sine,
- Enum.EasingDirection.Out,
- 0,
- false,
- 0
- )
- local partProperties = {
- CFrame = T.Parent.Head.CFrame * CFrame.new(0,-10,0)
- }
- local PlayerIn = tweenService:Create(T,tweenInformation,partProperties)
- PlayerIn:Play()
- wait(3)
- T.Anchored = false
- T:Destroy()
- local tweenInformation = TweenInfo.new (
- 2,
- Enum.EasingStyle.Sine,
- Enum.EasingDirection.In,
- 0,
- false,
- 0
- )
- local partProperties = {
- Size = Vector3.new(0,0,0)
- }
- local BloodIn = tweenService:Create(Cyl,tweenInformation,partProperties)
- BloodIn:Play()
- attacking = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement