Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Run it as a script and then a local script
- --h/link then hl/link
- --Commando
- --From 'Risk Of Rain'
- --Script by Null_Cat
- --...and so he left, with everything but his humanity.
- --[[About the script
- The Commando is characterized by long range and mobility.
- Effective use of his Tactical Dive will grant increased survivability,
- while suppressive fire deals massive damage.
- FMJ can then be used to dispose of large mobs.
- Mouse1: Double Tap (Shoot twice for 2x60% damage.)
- E: Full Metal Jacket (Shoot through enemies for 230% damage, knocking them back.)
- Left Control: Tactical Dive (Roll forward a small distance. You cannot be hit while rolling.)
- R: Suppressive Fire (Fire rapidly, stunning and hitting nearby enemies for 6x60% damage.)
- M: Music Control
- C: Bring up controls/info
- This script, of course, is mobile compatible, as well as computer compatible
- Alright, the script.
- --]]
- if script.ClassName == "Script" then
- --Oh dang almost forgot about this one line that breaks everything if its not in the script
- --local plr = game:service'Players'["Null_Cat"]
- local plr = owner
- local thatGoodBoi = Instance.new("RemoteEvent",plr.Character)
- thatGoodBoi.Name = "Commando Remote"
- --alright the rest isnt important
- script.Name = "RoR - Commando"
- local chr = plr.Character
- local hum = chr.Humanoid
- local plrG = plr:WaitForChild("PlayerGui")
- local head = chr.Head
- local torso = chr.Torso
- local ra = chr["Right Arm"]
- local la = chr["Left Arm"]
- local rl = chr["Right Leg"]
- local ll = chr["Left Leg"]
- local root = chr.HumanoidRootPart
- hum.MaxHealth = 110
- wait(1/60)
- hum.Health = hum.MaxHealth
- local dodging = false
- local healthCheck = true
- local attacking = false
- local level = 1
- local baseDamage = 9 + (3 * level)
- local levelHP = 78 + (32 * level)
- local levelRegen = 0.48 + (0.12 * level)
- --SERVICE
- local debri = game:service'Debris'
- local runS = game:service'RunService'
- function swait(num)
- if num == nil or num == 0 then
- runS.Stepped:wait(0)
- else
- for i = 1, num do
- runS.Stepped:wait(0)
- end
- end
- end
- function noOutline(Part)
- if Part.ClassName == "Part" or Part.ClassName == "WedgePart" then
- Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
- else
- error"The hell."
- end
- end
- --jk good music is important ok dont judge me
- local musicOn = false
- local musicChoose = 0
- local mOOsic
- function musicCtrl()
- if musicOn then
- musicOn = false
- mOOsic:Destroy()
- elseif not musicOn then
- musicOn = true
- mOOsic = Instance.new("Sound")
- mOOsic.Parent = head
- musicChoose = musicChoose + 1
- if musicChoose >= 3 then
- musicChoose = 1
- end
- if musicChoose == 1 then
- mOOsic.SoundId = "rbxassetid://1041562070"
- elseif musicChoose == 2 then
- mOOsic.SoundId = "rbxassetid://1082127066"
- end
- mOOsic.Looped = true
- mOOsic.Volume = 2.5
- --mOOsic:Play()
- end
- end
- --musicCtrl()
- --alright back to useless stuff
- --Damage Text
- function dmgTxt(dmg, type, pos)
- local link = Instance.new("Part", workspace)
- link.Anchored = true
- link.CanCollide = false
- link.Transparency = 1
- link.CFrame = pos
- local billBoard = Instance.new("BillboardGui", link)
- billBoard.Adornee = link
- billBoard.Size = UDim2.new(3,0,3,0)
- local textBox = Instance.new("TextLabel", billBoard)
- textBox.Text = dmg
- textBox.TextStrokeTransparency = 0
- textBox.TextStrokeColor3 = Color3.new(0,0,0)
- textBox.BackgroundTransparency = 1
- textBox.TextScaled = true
- if type == "Hit" then
- textBox.TextColor3 = Color3.new(1,1,1)
- textBox.Size = UDim2.new(0.5,0,0.5,0)
- debri:AddItem(link,1.5)
- elseif type == "Dodge" then
- textBox.TextColor3 = Color3.new(0.5,0.5,0.5)
- textBox.Size = UDim2.new(1,0,1,0)
- debri:AddItem(link,1.5)
- elseif type == "Hurt" then
- textBox.TextColor3 = Color3.new(0.5,0,.5)
- textBox.Size = UDim2.new(1,0,1,0)
- debri:AddItem(link,1.5)
- elseif type == "Level" then
- textBox.TextColor3 = Color3.new(0,0.9,0)
- textBox.Size = UDim2.new(1,0,1,0)
- debri:AddItem(link,3)
- end
- end
- pcall(function()
- chr.Health:Destroy()
- end)
- local currHP = hum.Health
- spawn(function()
- while wait(58/60) do
- if hum.Health > 0 then
- healthCheck = false
- wait(1/60)
- hum.Health = hum.Health + levelRegen
- wait(1/60)
- healthCheck = true
- currHP = hum.Health
- end
- end
- end)
- hum.HealthChanged:connect(function(damage)
- if dodging and healthCheck then
- dmgTxt("Dodged","Dodge",CFrame.new(head.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- elseif not dodging and healthCheck then
- dmgTxt(math.abs(currHP-damage),"Hurt",CFrame.new(head.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- end
- end)
- --Animations
- --Oh boi
- local CFN = CFrame.new
- local CFA = CFrame.Angles
- local R = math.rad
- local rs = torso['Right Shoulder']
- rs:Destroy()
- local ls = torso['Left Shoulder']
- ls:Destroy()
- local rh = torso['Right Hip']
- rh:Destroy()
- local lh = torso['Left Hip']
- lh:Destroy()
- local rj = root.RootJoint
- local rs = Instance.new("Weld", torso)
- rs.Name = "RS"
- local ls = Instance.new("Weld", torso)
- ls.Name = "LS"
- local rh = Instance.new("Weld", torso)
- rh.Name = "RH"
- local lh = Instance.new("Weld", torso)
- lh.Name = "LH"
- rs.Part0 = torso
- rs.Part1 = ra
- ls.Part0 = torso
- ls.Part1 = la
- rh.Part0 = torso
- rh.Part1 = rl
- lh.Part0 = torso
- lh.Part1 = ll
- local nc = torso.Neck
- pcall(function()
- chr.Animate:Destroy()
- end)
- pcall(function()
- hum.Animator:Destroy()
- end)
- ls.C0 = CFrame.new(-1.5, 0.5, 0)
- rs.C0 = CFrame.new(1.5, 0.5, 0)
- lh.C0 = CFrame.new(-0.5, -1, 0)
- rh.C0 = CFrame.new(0.5, -1, 0)
- nc.C0 = CFrame.new(0,1,0)
- ls.C1 = CFrame.new(0, 0.5, 0)
- rs.C1 = CFrame.new(0, 0.5, 0)
- lh.C1 = CFrame.new(0, 1, 0)
- rh.C1 = CFrame.new(0, 1, 0)
- nc.C1 = CFrame.new(0, -(1/2), 0)
- neckc0 = nc.C0
- lsc0 = ls.C0
- llc0 = lh.C0
- rsc0 = rs.C0
- rlc0 = rh.C0
- local sine = 0
- local holdW
- --Idle
- spawn(function()
- while true do
- for i = 0,2,0.2 do
- swait()
- local e = i / 2
- local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
- sine = sine + 0.5
- if not attacking then
- local humState = hum:GetState()
- if humState == Enum.HumanoidStateType.Seated then
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(90),R(180),R(0)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5,-1, 0)*CFA(R(90), R(0), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5,-1, 0)*CFA(R(90), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(90), R(0), R(0)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(90), R(0), R(0)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- elseif humState == Enum.HumanoidStateType.Climbing then
- elseif humState == Enum.HumanoidStateType.Running or humState == Enum.HumanoidStateType.RunningNoPhysics then
- if torvel < 1 then
- rj.C0 = rj.C0:lerp(CFN(0,-0.1 + 0.1 * math.cos(sine / 20),0)*CFA(R(90),R(180),R(-25)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(25),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -0.9 - 0.1 * math.cos(sine / 20), 0)*CFA(R(11), R(7), R(-11)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5, -0.9 - 0.1 * math.cos(sine / 20), 0)*CFA(R(-10), R(-9), R(8)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(0), R(0), R(-10)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(0), R(4), R(10)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- else
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(80),R(180),R(0)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -0.925 + 0.5 * math.cos(sine / 3.5) / 2, -0.5 * math.cos(sine / 3.5) / 2)*CFA(R(-15 + 35 * math.cos(sine / 3.5)) + math.sin(sine / 3.5) / 2.5, R(0 - 2 * math.cos(sine / 3.5)), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5, -0.925 - 0.5 * math.cos(sine / 3.5) / 2, 0.5 * math.cos(sine / 3.5) / 2)*CFA(R(-15 - 35 * math.cos(sine / 3.5)) + -math.sin(sine / 3.5) / 2.5, R(0 - 2 * math.cos(sine / 3.5)), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(-15 - 35 * math.cos(sine / 3.5)) + -math.sin(sine / 3.5) / 2.5, R(0 - 2 * math.cos(sine / 3.5)), R(0)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(62), R(6), R(-39)),0.2/2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- end
- elseif 1 > root.Velocity.y then
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(80),R(180),R(0)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(-10),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5,-1, 0)*CFA(R(50), R(0), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5,-1, 0)*CFA(R(20), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(-20), R(0), R(-10)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(-20), R(0), R(10)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- elseif 1 < root.Velocity.y then
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(110),R(180),R(0)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(20),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5,-1, 0)*CFA(R(-20), R(0), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5,-1, 0)*CFA(R(-50), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(-20), R(0), R(-10)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(-20), R(0), R(10)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- elseif humState == Enum.HumanoidStateType.Swimming then
- elseif humState == Enum.HumanoidStateType.Landed then
- end
- else
- end
- end
- end
- end)
- --rs.C0 = CFN(1,0.5,-0.5) * CFA(R(0),R(125),R(60))
- --ls.C0 = CFN(-1,0.5,-0.5) * CFA(R(0),R(-125),R(-60))
- --Gun
- local gun = Instance.new("Model", chr)
- gun.Name = "CGun"
- local hold = Instance.new("Part", gun)
- noOutline(hold)
- hold.Size = Vector3.new(.5, .5, 1)
- hold.CanCollide = false
- hold.Anchored = false
- hold.Color = Color3.new(0,0,0)
- holdW = Instance.new("Weld", hold)
- holdW.Part0 = hold
- holdW.Part1 = ra
- holdW.C1 = CFrame.new(0,-0.85,-0.25) *CFrame.Angles(R(0),R(0),R(0))
- local barrel = Instance.new("Part", gun)
- noOutline(barrel)
- barrel.Size = Vector3.new(.5, 2, .4)
- barrel.CanCollide = false
- barrel.Anchored = false
- barrel.Color = Color3.new(0,0,0)
- local barrelW = Instance.new("Weld", hold)
- barrelW.Part0 = barrel
- barrelW.Part1 = hold
- barrelW.C1 = CFrame.new(0,-0.5,-0.5) *CFrame.Angles(R(0),R(0),R(0))
- for _,i in pairs(chr:GetDescendants()) do
- if i:IsA("BasePart") then
- i:SetNetworkOwner(plr)
- end
- end
- --Abilities
- local fMJDisable = false
- local diveDisable = false
- local fireDisable = false
- function doubleTap() --Cooldown: 0
- if not attacking then
- attacking = true
- hum.WalkSpeed = 0
- for i = 1,2 do
- for i = 0,2,0.3 do
- swait()
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(90),R(180),R(60)),0.4)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(-60),R(0)),0.4)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -1, 0)*CFA(R(0), R(0), R(-10)),0.4)
- rh.C0 = rh.C0:lerp(CFN(0.5, -1, 0)*CFA(R(0), R(0), R(0)),0.4)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(-40), R(60), R(20)),0.4)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(90), R(0), R(60)),0.4)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.4)
- end
- local bullet = Instance.new("Part", gun)
- bullet.Name = "oh no a bullet"
- bullet.CFrame = CFN(barrel.CFrame.p)
- noOutline(bullet)
- bullet.CanCollide = false
- bullet.Transparency = 1
- bullet.Size = Vector3.new(2,2,2)
- bullet.Velocity = barrel.CFrame.upVector * -500
- bullet.Touched:connect(function(partHit)
- local check1 = partHit.Parent
- local check2 = partHit.Parent:FindFirstChildOfClass("Humanoid")
- local check3 = partHit.Parent.Parent
- local check4 = partHit.Parent.Parent:FindFirstChildOfClass("Humanoid")
- if check1.Name ~= chr.Name and check3.Name ~= chr.Name then
- if check1.ClassName == "Model" and check2 ~= nil and check2.Name ~= "Dead" then
- bullet:Destroy()
- local dmg = (baseDamage * 0.6)
- check2.Health = check2.Health - dmg
- local hed = check1.Head
- dmgTxt(dmg,"Hit",CFrame.new(hed.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- if check2.Health <= 0 and check2.Name ~= "Dead" then
- check2.Name = "Dead"
- gainEXP(check2.MaxHealth)
- end
- elseif check3.ClassName == "Model" and check4 ~= nil and check4.Name ~= "Dead" then
- bullet:Destroy()
- local dmg = (baseDamage * 0.6)
- check4.Health = check4.Health - dmg
- local hed = check3.Head
- dmgTxt(dmg,"Hit",CFrame.new(hed.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- if check4.Health <= 0 and check4.Name ~= "Dead" then
- check4.Name = "Dead"
- gainEXP(check2.MaxHealth)
- end
- end
- end
- end)
- for i = 0,2,0.3 do
- swait()
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(90),R(180),R(60)),0.4)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(-60),R(0)),0.4)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -1, 0)*CFA(R(0), R(0), R(-10)),0.4)
- rh.C0 = rh.C0:lerp(CFN(0.5, -1, 0)*CFA(R(0), R(0), R(0)),0.4)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(-40), R(60), R(20)),0.4)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(120), R(30), R(60)),0.4)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.4)
- end
- end
- hum.WalkSpeed = 16
- attacking = false
- end
- end
- function fullMetalJacket() --Cooldown: 3
- if not attacking and not fMJDisable then
- attacking = true
- hum.WalkSpeed = 0
- for i = 0,2,0.25 do
- swait()
- rj.C0 = rj.C0:lerp(CFN(0,-0.6,0)*CFA(R(90),R(180),R(60)),0.4)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(-60),R(0)),0.4)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -0.4, -0.6)*CFA(R(0), R(0), R(-30)),0.4)
- rh.C0 = rh.C0:lerp(CFN(0.5, -0.4, -0.6)*CFA(R(-30), R(0), R(0)),0.4)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(0), R(0), R(-20)),0.4)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(90), R(0), R(60)),0.4)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.4)
- end
- local bullet = Instance.new("Part", gun)
- bullet.Name = "oh no a bullet"
- bullet.CFrame = CFN(barrel.CFrame.p)
- noOutline(bullet)
- bullet.CanCollide = false
- bullet.Transparency = 1
- bullet.Size = Vector3.new(2,2,2)
- bullet.Velocity = barrel.CFrame.upVector * -500
- bullet.Touched:connect(function(partHit)
- local check1 = partHit.Parent
- local check2 = partHit.Parent:FindFirstChildOfClass("Humanoid")
- local check3 = partHit.Parent.Parent
- local check4 = partHit.Parent.Parent:FindFirstChildOfClass("Humanoid")
- if check1.Name ~= chr.Name and check3.Name ~= chr.Name then
- if check1.ClassName == "Model" and check2 ~= nil and check2.Name ~= "Marked" and check2.Name ~= "Dead" then
- check2.Name = "Marked"
- local dmg = (baseDamage * 2.3)
- check2.Health = check2.Health - dmg
- local hed = check1.Head
- local tors = check1.Torso
- check2.PlatformStand = false
- local knock = Instance.new("BodyVelocity", tors)
- knock.Name = "Knockback"
- knock.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- knock.P = 75000
- knock.Velocity= tors.CFrame.lookVector * -10
- dmgTxt(dmg,"Hit",CFrame.new(hed.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- if check2.Health <= 0 and check2.Name ~= "Dead" then
- check2.Name = "Dead"
- gainEXP(check2.MaxHealth)
- end
- elseif check3.ClassName == "Model" and check4 ~= nil and check4.Name ~= "Marked" and check4.Name ~= "Dead" then
- check4.Name = "Marked"
- local dmg = (baseDamage * 2.3)
- check4.Health = check4.Health - dmg
- local hed = check3.Head
- local tors = check3.Torso
- check4.PlatformStand = true
- local knock = Instance.new("BodyVelocity", tors)
- knock.Name = "Knockback"
- knock.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- knock.P = 75000
- knock.Velocity= tors.CFrame.lookVector * -10
- dmgTxt(dmg,"Hit",CFrame.new(hed.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- if check4.Health <= 0 and check4.Name ~= "Dead" then
- check4.Name = "Dead"
- gainEXP(check4.MaxHealth)
- end
- end
- end
- end)
- for i = 0,2,0.18 do
- swait()
- rj.C0 = rj.C0:lerp(CFN(0,-0.6,0)*CFA(R(90),R(180),R(60)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(-60),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -0.4, -0.6)*CFA(R(0), R(0), R(-30)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5, -0.4, -0.6)*CFA(R(-30), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(0), R(0), R(-20)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(120), R(30), R(60)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- end
- wait(0.35)
- for _, instance in pairs(workspace:GetDescendants()) do
- if instance:IsA("Humanoid") and instance.Name == "Marked" then
- instance.Name = "Humanoid"
- instance.PlatformStand = false
- end
- if instance:IsA("BodyVelocity") and instance.Name == "Knockback" then
- instance:Destroy()
- end
- end
- hum.WalkSpeed = 16
- attacking = false
- --[[spawn(function()
- fMJDisable = true
- if mobileCheck then
- CAS:SetTitle("E","3")
- wait(1)
- CAS:SetTitle("E","2")
- wait(1)
- CAS:SetTitle("E","1")
- wait(1)
- fMJDisable = false
- CAS:SetTitle("E","E")
- else
- wait(3)
- fMJDisable = false
- end
- end)]]--
- end
- end
- function tacticalDive() --Cooldown: 4
- if not diveDisable and not attacking then
- dodging = true
- attacking = true
- local prevHP = hum.Health
- wait(1/60)
- hum.WalkSpeed = 30
- hum.Jump = true
- healthCheck = false
- hum.MaxHealth = math.huge
- wait(1/60)
- hum.Health = hum.MaxHealth
- healthCheck = true
- local e = 0
- for i = 0,2,0.2 do
- swait()
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(30),R(180),R(0)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -1, 0)*CFA(R(-70), R(0), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5, -1, 0)*CFA(R(-110), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(60), R(0), R(0)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(40), R(0), R(0)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- end
- for i = 0,4,0.2 do
- swait()
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(0),R(180),R(0)),0.2/4)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -1, 0)*CFA(R(-70), R(0), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5, -1, 0)*CFA(R(-110), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(60), R(0), R(0)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(40), R(0), R(0)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- end
- for i = 0,4,0.4 do
- swait()
- e = i / 4
- rj.C0 = rj.C0:lerp(CFN(0,-0.6,0)*CFA(R(-90),R(180),R(0)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(-30),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -0.4, -0.6)*CFA(R(0), R(0), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5, -0.4, -0.6)*CFA(R(-10), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(30), R(0), R(20)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(30), R(0), R(-20)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- end
- for i = 0,4,0.4 do
- swait()
- e = i / 4
- rj.C0 = rj.C0:lerp(CFN(0,-1.2,0)*CFA(R(180),R(180),R(0)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(-30),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -0.4, -0.6)*CFA(R(0), R(0), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5, -0.4, -0.6)*CFA(R(-10), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(30), R(0), R(20)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(30), R(0), R(-20)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- end
- for i = 0,4,0.4 do
- swait()
- e = i / 4
- rj.C0 = rj.C0:lerp(CFN(0,-0.6,0)*CFA(R(90),R(180),R(0)),0.2)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(-30),R(0),R(0)),0.2)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -0.4, -0.6)*CFA(R(0), R(0), R(0)),0.2)
- rh.C0 = rh.C0:lerp(CFN(0.5, -0.4, -0.6)*CFA(R(-10), R(0), R(0)),0.2)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(30), R(0), R(20)),0.2)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(30), R(0), R(-20)),0.2)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.2)
- end
- hum.WalkSpeed = 16
- healthCheck = false
- hum.MaxHealth = levelHP
- wait(1/60)
- hum.Health = prevHP
- healthCheck = true
- dodging = false
- attacking = false
- rj.C0 = CFN(0,0,-0.1) * CFA(R(90),R(180),R(0))
- --[[spawn(function()
- diveDisable = true
- if mobileCheck then
- CAS:SetTitle("LC","4")
- wait(1)
- CAS:SetTitle("LC","3")
- wait(1)
- CAS:SetTitle("LC","2")
- wait(1)
- CAS:SetTitle("LC","1")
- wait(1)
- diveDisable = false
- CAS:SetTitle("LC","LC")
- else
- wait(4)
- diveDisable = false
- end
- end)]]--
- end
- end
- function suppressiveFire() --Cooldown: 5
- if not attacking and not fireDisable then
- attacking = true
- hum.WalkSpeed = 0
- for i = 1,6 do
- for i = 0,2,0.6 do
- swait()
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(90),R(180),R(60)),0.7)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(-60),R(0)),0.7)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -1, 0)*CFA(R(0), R(0), R(-10)),0.7)
- rh.C0 = rh.C0:lerp(CFN(0.5, -1, 0)*CFA(R(0), R(0), R(0)),0.7)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(60), R(120), R(20)),0.7)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(90), R(0), R(60)),0.7)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.7)
- end
- local bullet = Instance.new("Part", gun)
- bullet.Name = "oh no a bullet"
- bullet.CFrame = CFN(barrel.CFrame.p)
- noOutline(bullet)
- bullet.CanCollide = false
- bullet.Transparency = 1
- bullet.Size = Vector3.new(2,2,2)
- bullet.Velocity = barrel.CFrame.upVector * -500
- bullet.Touched:connect(function(partHit)
- local check1 = partHit.Parent
- local check2 = partHit.Parent:FindFirstChildOfClass("Humanoid")
- local check3 = partHit.Parent.Parent
- local check4 = partHit.Parent.Parent:FindFirstChildOfClass("Humanoid")
- if check1.Name ~= chr.Name and check3.Name ~= chr.Name then
- if check1.ClassName == "Model" and check2 ~= nil and check2.Name ~= "Dead" then
- bullet:Destroy()
- local dmg = (baseDamage * 0.6)
- check2.Health = check2.Health - dmg
- local hed = check1.Head
- local tors = (check1.Torso or check1.LowerTorso)
- if i == 1 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 2 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 3 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 4 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 5 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 6 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- end
- dmgTxt(dmg,"Hit",CFrame.new(hed.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- if check2.Health <= 0 and check2.Name ~= "Dead" then
- check2.Name = "Dead"
- gainEXP(check2.MaxHealth)
- end
- elseif check3.ClassName == "Model" and check4 ~= nil and check4.Name ~= "Dead" then
- bullet:Destroy()
- local dmg = (baseDamage * 0.6)
- check4.Health = check4.Health - dmg
- local hed = check3.Head
- local tors = (check3.Torso or check3.LowerTorso)
- tors.Anchored = true
- if i == 1 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 2 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 3 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 4 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 5 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- elseif i == 6 then
- spawn(function()
- tors.Anchored = true
- wait(2)
- tors.Anchored = false
- end)
- end
- dmgTxt(dmg,"Hit",CFrame.new(hed.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- if check4.Health <= 0 and check4.Name ~= "Dead" then
- check4.Name = "Dead"
- gainEXP(check4.MaxHealth)
- end
- end
- end
- end)
- for i = 0,2,0.6 do
- swait()
- rj.C0 = rj.C0:lerp(CFN(0,0,0)*CFA(R(90),R(180),R(60)),0.7)
- nc.C0 = nc.C0:lerp(CFN(0,1,0)*CFA(R(0),R(-60),R(0)),0.7)
- lh.C0 = lh.C0:lerp(CFN(-0.5, -1, 0)*CFA(R(0), R(0), R(-10)),0.7)
- rh.C0 = rh.C0:lerp(CFN(0.5, -1, 0)*CFA(R(0), R(0), R(0)),0.7)
- ls.C0 = ls.C0:lerp(CFN(-1.5, 0.5, 0)*CFA(R(60), R(120), R(20)),0.7)
- rs.C0 = rs.C0:lerp(CFN(1.5, 0.5, 0)*CFA(R(120), R(30), R(60)),0.7)
- holdW.C1 = holdW.C1:lerp(CFN(0,-0.85,-0.25) *CFA(R(0),R(0),R(0)),0.7)
- end
- end
- hum.WalkSpeed = 16
- attacking = false
- --[[spawn(function()
- fireDisable = true
- if mobileCheck then
- CAS:SetTitle("R","5")
- wait(1)
- CAS:SetTitle("R","4")
- wait(1)
- CAS:SetTitle("R","3")
- wait(1)
- CAS:SetTitle("R","2")
- wait(1)
- CAS:SetTitle("R","1")
- wait(1)
- fireDisable = false
- CAS:SetTitle("R","R")
- else
- wait(4)
- fireDisable = false
- end
- end)]]--
- end
- end
- --Leveling system
- local xpLevelGain = 125 * (level * 1.5)
- local xpLevel = 0
- function gainEXP(maxHP)
- xpLevel = xpLevel + maxHP
- if xpLevel >= xpLevelGain then
- level = level + 1
- xpLevel = 0
- xpLevelGain = 125 * (level * 1.5)
- levelHP = 78 + (32 * level)
- healthCheck = false
- hum.MaxHealth = levelHP
- swait()
- hum.Health = hum.Health + 32
- healthCheck = true
- baseDamage = 9 + (3 * level)
- levelRegen = 0.48 + (0.12 * level)
- dmgTxt("Level Up","Level",CFrame.new(head.CFrame * CFrame.new(math.random(-20,20)/10,math.random(3,5),math.random(-20,20)/10).p))
- print(level.."-"..xpLevelGain)
- end
- end
- --Control + Info
- function controlRead()
- print"The Commando is characterized by long range and mobility.\nEffective use of his Tactical Dive will grant increased survivability,\nwhile suppressive fire deals massive damage.\nFMJ can then be used to dispose of large mobs.\n"
- print"Mouse1: Double Tap (Shoot twice for 2x60% damage.)\nE: Full Metal Jacket (Shoot through enemies for 230% damage, knocking them back.)\nLeft Control: Tactical Dive (Roll forward a small distance. You cannot be hit while rolling.)\nR: Suppressive Fire (Fire rapidly, stunning and hitting nearby enemies for 6x60% damage.)\nM: Music Control"
- end
- hum.Died:connect(function()
- local billBoardGui = Instance.new("BillboardGui",head)
- billBoardGui.Size = UDim2.new(0,200,0,50)
- billBoardGui.StudsOffset = Vector3.new(0,3,0)
- local textLabelGui = Instance.new("TextLabel",billBoardGui)
- textLabelGui.BackgroundTransparency = 1
- textLabelGui.Size = UDim2.new(10,0,1,0)
- textLabelGui.Position = UDim2.new(-4.5,0,0,0)
- textLabelGui.Font = "SourceSans"
- textLabelGui.TextSize = 15
- textLabelGui.TextColor3 = Color3.new(1,1,1)
- textLabelGui.TextStrokeColor3 = Color3.new(0,0,0)
- textLabelGui.TextStrokeTransparency = 0
- textLabelGui.TextWrapped = true
- local deathMessage = math.random(1,18)
- if deathMessage == 1 then
- textLabelGui.Text = "You are dead."
- elseif deathMessage == 2 then
- textLabelGui.Text = "You embrace the void."
- elseif deathMessage == 3 then
- textLabelGui.Text = "You had a lot more to live for."
- elseif deathMessage == 4 then
- textLabelGui.Text = "You died painlessly."
- elseif deathMessage == 5 then
- textLabelGui.Text = "Your death was extremely painful."
- elseif deathMessage == 6 then
- textLabelGui.Text = "You die a slightly embarassing death."
- elseif deathMessage == 7 then
- textLabelGui.Text = "You die in a hilarious pose."
- elseif deathMessage == 8 then
- textLabelGui.Text = "You really messed up."
- elseif deathMessage == 9 then
- textLabelGui.Text = "It wasn't your time to die..."
- elseif deathMessage == 10 then
- textLabelGui.Text = "That was definitely not your fault."
- elseif deathMessage == 11 then
- textLabelGui.Text = "That was absolutely your fault."
- elseif deathMessage == 12 then
- textLabelGui.Text = "..the harder they fall."
- elseif deathMessage == 13 then
- textLabelGui.Text = "Beep.. beep.. beeeeeeeeeeeeeeeee"
- elseif deathMessage == 14 then
- textLabelGui.Text = "Crushed."
- elseif deathMessage == 15 then
- textLabelGui.Text = "DEAD"
- elseif deathMessage == 16 then
- textLabelGui.Text = "ded"
- elseif deathMessage == 17 then
- textLabelGui.Text = "rekt"
- elseif deathMessage == 18 then
- textLabelGui.Text = "ur dead LOL get rekt"
- end
- end)
- thatGoodBoi.OnServerEvent:connect(function(plr,action)
- if action == 1 then
- doubleTap()
- elseif action == 2 then
- fullMetalJacket()
- elseif action == 3 then
- tacticalDive()
- elseif action == 4 then
- suppressiveFire()
- elseif action == 5 then
- musicCtrl()
- elseif action == 6 then
- controlRead()
- end
- end)
- elseif script.ClassName == "LocalScript" then
- local plr = game:service'Players'.LocalPlayer
- local CAS = game:service'ContextActionService'
- local uIS = game:service'UserInputService'
- print"Run this using h/ or r/ FIRST, then run it using hl/ or rl/"
- local thatGoodBoi = plr.Character["Commando Remote"]
- local fMJDisable = false
- local diveDisable = false
- local fireDisable = false
- --Checks if player is on PC or on Mobile
- local mobileCheck
- if uIS.TouchEnabled and not uIS.KeyboardEnabled then
- mobileCheck = true
- else
- mobileCheck = false
- end
- --Controlsssssss
- if mobileCheck then
- function createButton(name,xpos,ypos,action,keybind)
- local trueX = xpos - (xpos * 2)
- local trueY = ypos - (ypos * 2)
- CAS:BindAction(name,action,true,Enum.KeyCode[keybind])
- CAS:SetTitle(name,name)
- CAS:SetPosition(name, UDim2.new(0.72, trueX, 0.20, trueY))
- end
- function removeButton(name)
- if name == "all" then
- CAS:UnbindAllActions()
- else
- CAS:UnbindAction(name)
- end
- end
- function mobileButtonPress(r,g,b)
- if g == Enum.UserInputState.Begin then
- if r == "M1" then
- thatGoodBoi:FireServer(1)
- elseif r == "E" then
- if not fMJDisable then
- fMJDisable = true
- spawn(function()
- CAS:SetTitle("E","3")
- wait(1)
- CAS:SetTitle("E","2")
- wait(1)
- CAS:SetTitle("E","1")
- wait(1)
- CAS:SetTitle("E","E")
- fMJDisable = false
- end)
- thatGoodBoi:FireServer(2)
- end
- elseif r == "LC" then
- if not diveDisable then
- diveDisable = true
- spawn(function()
- CAS:SetTitle("LC","4")
- wait(1)
- CAS:SetTitle("LC","3")
- wait(1)
- CAS:SetTitle("LC","2")
- wait(1)
- CAS:SetTitle("LC","1")
- wait(1)
- CAS:SetTitle("LC","LC")
- diveDisable = false
- end)
- thatGoodBoi:FireServer(3)
- end
- elseif r == "R" then --wow
- if not fireDisable then
- fireDisable = true
- spawn(function()
- CAS:SetTitle("R","5")
- wait(1)
- CAS:SetTitle("R","4")
- wait(1)
- CAS:SetTitle("R","3")
- wait(1)
- CAS:SetTitle("R","2")
- wait(1)
- CAS:SetTitle("R","1")
- wait(1)
- CAS:SetTitle("R","R")
- fireDisable = false
- end)
- thatGoodBoi:FireServer(4)
- end
- elseif r == "M" then
- thatGoodBoi:FireServer(5)
- elseif r == "C" then
- thatGoodBoi:FireServer(6)
- end
- end
- end
- createButton("M1",75,25,mobileButtonPress,"Q")
- createButton("E",25,25,mobileButtonPress,"E")
- createButton("LC",75,75,mobileButtonPress,"LeftControl")
- createButton("R",25,75,mobileButtonPress,"R")
- createButton("M",50,125,mobileButtonPress,"M")
- --createButton("C",50,175,mobileButtonPress,"C")
- else
- uIS.InputBegan:connect(function(r,gamePro)
- if not gamePro then
- if r.UserInputType == Enum.UserInputType.MouseButton1 then
- thatGoodBoi:FireServer(1)
- elseif r.KeyCode == Enum.KeyCode.E then
- if not fMJDisable then
- spawn(function()
- fMJDisable = true
- wait(3)
- fMJDisable = false
- end)
- thatGoodBoi:FireServer(2)
- end
- elseif r.KeyCode == Enum.KeyCode.LeftControl then
- if not diveDisable then
- spawn(function()
- diveDisable = true
- wait(4)
- diveDisable = false
- end)
- thatGoodBoi:FireServer(3)
- end
- elseif r.KeyCode == Enum.KeyCode.R then --wow
- if not fireDisable then
- spawn(function()
- fireDisable = true
- wait(5)
- fireDisable = false
- end)
- thatGoodBoi:FireServer(4)
- end
- elseif r.KeyCode == Enum.KeyCode.M then
- thatGoodBoi:FireServer(5)
- elseif r.KeyCode == Enum.KeyCode.C then
- thatGoodBoi:FireServer(6)
- end
- end
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement