Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[ MADE BY ICEDEV (@TOMERTHEPRO1) ]--
- --[ SERVICES ]--
- local Plrs = game:GetService("Players")
- local RS = game:GetService("ReplicatedStorage")
- --[ REPLICATED STORAGE ]--
- local Killstreaks = RS:WaitForChild("Killstreaks")
- local Assets = RS:WaitForChild("Assets")
- local Sounds = RS:WaitForChild("Sounds")
- local Remotes = RS:WaitForChild("Remotes")
- -- Remotes
- local soundRemote = Remotes.PlaySound
- local camRemote = Remotes.SetCamera
- -- Killstreaks
- local visionks = Killstreaks.Vision
- local airpackageks = Killstreaks.AirPackage
- local juggernautk = Killstreaks.Juggernaut
- local psychomodeks = Killstreaks.PsychoMode
- local flamethrowerks = Killstreaks.Flamethrower
- local rcxdks = Killstreaks.RCXD
- -- Sounds
- local atvSFX = Sounds.aThermalVision
- local etvSFX = Sounds.eThermalVision
- local alpSFX = Sounds.aLandingPackage
- local elpSFX = Sounds.eLandingPackage
- local apmSFX = Sounds.aPsycho
- local epmSFX = Sounds.ePsycho
- local aftSFX = Sounds.aFlamethrower
- local eftSFX = Sounds.eFlamethrower
- -- Assets
- local highlight = Assets.Highlight
- local airpackage = Assets.AirPackage
- local jnweapon = Assets.Minigun
- local jnarmor = Assets.Juggernaut
- local psychoknife = Assets.Knife
- local flamethrower = Assets.Flamethrower
- local car = Assets.Car
- local animate = Assets.Animate
- local streaks = {}
- --[ PLAYER ADDED ]--
- Plrs.PlayerAdded:Connect(function(plr)
- plr.CharacterAdded:Connect(function(char)
- local hum:Humanoid = char:WaitForChild("Humanoid")
- local ch = hum.Health
- hum.HealthChanged:Connect(function(health)
- if health < ch and char:FindFirstChild("Resistance") then -- if it got damaged
- local res = char.Resistance
- if res:IsA("IntValue") then -- if player has resistance it reduces damage
- local dmg = ch-health
- local resDmg = dmg - dmg*(res.Value/100)
- health = ch
- health -= resDmg
- print(dmg,resDmg)
- end
- end
- ch = health
- end)
- end)
- end)
- --[ SOUND PLAYER FUNCTION ]--
- function playSound(plr:Player,allySound:Sound,enemySound:Sound)
- local team = plr.Team
- for i,v in Plrs:GetChildren() do
- if v:IsA("Player") then
- if v.Team == team then
- soundRemote:FireClient(v,allySound)
- else
- soundRemote:FireClient(v,enemySound)
- end
- end
- end
- end
- --[ MOVE MODEL FUNCTION ]--
- function moveModel(model:Model,cframe:CFrame)
- for i,v in model:GetChildren() do
- if v:IsA("MeshPart") or v:IsA("Part") or v:IsA("BasePart") then
- v.CFrame = cframe
- end
- end
- end
- --[ CHANGE CHARACTER VISIBILITY ]--
- function charVis(char:Model,bool:BoolValue)
- local visible = 0
- if bool == true then
- visible = 0
- elseif bool == false then
- visible = 1
- end
- for i,v in char:GetDescendants() do
- if v:IsA("MeshPart") or v:IsA("Part") or v:IsA("BasePart") or v:IsA("Decal") then
- if v.Name ~= "HumanoidRootPart" then
- v.Transparency = visible
- end
- elseif v:IsA("Accessory") and bool == false then
- v:Destroy()
- end
- end
- end
- --[ CLONE CHARACTER FUNCTION ]--
- function cloneChar(char:Model)
- char.Archivable = true
- local clone = char:Clone()
- clone.Name = char.Name.."Clone"
- char.Archivable = false
- return clone
- end
- --[ KILLSTREAK FUNCTIONS ]--
- streaks.VisionKS = function(plr:Player)
- print("THERMAL VISION SERVER")
- playSound(plr,atvSFX,etvSFX)
- local team = plr.Team
- -- Add Highlight to Enemy Team
- for i,v in workspace:GetChildren() do
- if v:IsA("Model") and v:FindFirstChild("Humanoid") and Plrs:FindFirstChild(v.Name) then -- if its a player
- local plr2 = Plrs:GetPlayerFromCharacter(v)
- if plr2.Team ~= plr.Team then -- if player is in enemy team
- print("KILLSTREAK BEGUN: "..v.Name)
- local hClone = highlight:Clone()
- hClone.Parent = v
- end
- end
- end
- task.wait(20) -- 20 seconds duration
- for i,v in workspace:GetChildren() do
- -- if its a player and the player is highlighted
- if v:IsA("Model") and v:FindFirstChild("Humanoid") and Plrs:FindFirstChild(v.Name) and v:FindFirstChild("Highlight") then
- v.Highlight:Destroy()
- end
- end
- end
- streaks.AirPackageKS = function(plr:Player)
- print("AIR PACKAGE SERVER",streaks)
- playSound(plr,alpSFX,elpSFX)
- local apClone = airpackage:Clone()
- local prompt = apClone.ProximityPrompt
- apClone.Parent = workspace
- apClone.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,20,-5)
- prompt.Triggered:Connect(function() -- When air package is used
- apClone:Destroy()
- local count = {}
- -- Choose random streak if its not the same one
- for i,v in pairs(streaks) do
- if v ~= streaks.AirPackageKS then
- print(v)
- table.insert(count,i)
- end
- end
- local randStreak = count[math.random(1,#count)]
- streaks[randStreak](plr)
- end)
- end
- streaks.JuggernautKS = function(plr:Player)
- print("JUGGERNAUT SERVER")
- local char = plr.Character or plr.CharacterAdded:Wait()
- local hum:Humanoid = char:FindFirstChild("Humanoid")
- local res = Instance.new("IntValue")
- local jnwClone = jnweapon:Clone()
- local cFolder = Instance.new("Folder",char)
- cFolder.Name = "ClothesFolder"
- -- Resistance Value removed 60 seconds after
- jnwClone.Parent = plr.Backpack
- res.Name = "Resistance"
- res.Value = 50
- res.Parent = char
- -- Check Character Shirt & Pants
- for i,v in char:GetChildren() do
- if v:IsA("Shirt") or v:IsA("Pants") then
- v.Parent = char:FindFirstChild("ClothesFolder")
- end
- end
- -- Add Juggernaut Armor
- for i,v in jnarmor:GetChildren() do
- if v:IsA("Accessory") or v:IsA("Shirt") or v:IsA("Pants") then
- local item = v:Clone()
- local val = Instance.new("BoolValue",item)
- val.Name = "Juggernaut"
- item.Parent = char
- end
- end
- task.wait(60)
- res:Destroy()
- hum:UnequipTools()
- task.wait(.1)
- jnwClone:Destroy()
- for i,v in char:GetChildren() do
- if v:IsA("Accessory") or v:IsA("Shirt") or v:IsA("Pants") then
- if v:FindFirstChild("Juggernaut") then
- v:Destroy()
- end
- elseif v:IsA("Folder") and v.Name == "ClothesFolder" then
- for i,v in v:GetChildren() do
- v.Parent = char
- end
- v:Destroy()
- end
- end
- end
- streaks.PsychoModeKS = function(plr:Player)
- print("PSYCHO SERVER")
- playSound(plr,apmSFX,epmSFX)
- local char = plr.Character
- local hum:Humanoid = char:FindFirstChild("Humanoid")
- hum.WalkSpeed = 36
- local pskClone = psychoknife:Clone()
- pskClone.Parent = plr.Backpack
- -- Player Invincibility
- local res = Instance.new("IntValue")
- res.Name = "Resistance"
- res.Value = 100 -- 100% Resistance
- res.Parent = char
- task.wait(10)
- hum:UnequipTools()
- task.wait(.1)
- pskClone:Destroy()
- res:Destroy()
- hum.WalkSpeed = 16
- end
- streaks.FlamethrowerKS = function(plr:Player)
- print("FLAMETHROWER SERVER")
- playSound(plr,aftSFX,eftSFX)
- local char = plr.Character
- local hum:Humanoid = char:FindFirstChild("Humanoid")
- local ftClone = flamethrower:Clone()
- ftClone.Parent = plr.Backpack
- end
- streaks.RCXD = function(plr:Player)
- local char = plr.Character or plr.CharacterAdded:Wait()
- local hrt:BasePart = char:WaitForChild("HumanoidRootPart")
- local carClone = car:Clone()
- local ppart = carClone.PrimaryPart
- -- if ppart then print(ppart.Name) else warn("no pp :^(") end
- local clone:Model = cloneChar(char)
- local cHum:Humanoid = clone:FindFirstChild("Humanoid")
- local cHrt:Part = clone:FindFirstChild("HumanoidRootPart")
- -- if cHum then print("Found clone humanoid!") else warn("Didn't find clone humanoid!") end
- carClone.Parent = workspace
- moveModel(carClone,hrt.CFrame)
- charVis(char,false)
- task.wait(.1)
- clone.Parent = workspace
- cHrt.CFrame = cHrt.CFrame + Vector3.new(0,0,5)
- charVis(clone,true)
- camRemote:FireClient(plr,ppart)
- -- Make car explode when touched
- ppart.Touched:Connect(function(hit:BasePart)
- -- If the hit's parent is a player and is not the player driving the car
- if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= char.Name.."Clone" and hit.Parent.Name ~= char.Name then
- local enemy = hit.Parent
- local ehrt = enemy:FindFirstChild("HumanoidRootPart")
- local ehum:Humanoid = enemy:FindFirstChild("Humanoid")
- local e = Instance.new("Explosion",ppart) -- Explosion to spawn on the enemy
- e.Position = ppart.Position
- task.wait(.25)
- ehum.Health = 0
- plr.Character = clone
- camRemote:FireClient(plr,plr.Character:WaitForChild("Humanoid"))
- animate:Clone().Parent = plr.Character
- carClone:Destroy()
- end
- end)
- end
- --[ CONNCET STREAKS TO REMOTE FUNCTIONS ]--
- visionks.OnServerInvoke = streaks.VisionKS
- airpackageks.OnServerInvoke = streaks.AirPackageKS
- juggernautk.OnServerInvoke = streaks.JuggernautKS
- psychomodeks.OnServerInvoke = streaks.PsychoModeKS
- flamethrowerks.OnServerInvoke = streaks.FlamethrowerKS
- rcxdks.OnServerInvoke = streaks.RCXD
Advertisement
Advertisement