Joriangames

KillStreak System

May 4th, 2022 (edited)
749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. --[[
  2. Thanks for using this script
  3. This script is made by Joriangames/BloxianCode
  4. Want to know script explanation?
  5. Check the video here: https://youtu.be/Ji8_SmfGssg
  6. ]]
  7. game.Players.PlayerAdded:Connect(function(plr)
  8.     local lead = Instance.new("Folder", plr)
  9.     lead.Name = "leaderstats"
  10.    
  11.     local streak = Instance.new("IntValue", lead)
  12.     streak.Name = "Streak"
  13.    
  14.    
  15.     plr.CharacterAdded:Connect(function(char)
  16.         local hum = char:WaitForChild("Humanoid")
  17.         hum.Died:Connect(function()
  18.             local tag = hum:FindFirstChild("creator")
  19.             if tag then
  20.                 local killer = tag.Value
  21.                 killer.leaderstats.Streak.Value = killer.leaderstats.Streak.Value +1
  22.             end
  23.             streak.Value = 0
  24.         end)
  25.     end)
  26. end)
Add Comment
Please, Sign In to add comment