Advertisement
Hasli4

RBLX. TouchScript

May 15th, 2025
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local RESPAWN_DURATION = 3
  2. local Players = game:GetService("Players")
  3. local ServerStorage = game:GetService("ServerStorage")
  4. local function onTouched(other)
  5.     if (other.Name == "HumanoidRootPart"
  6. or other.Name == "Cannon") then
  7.         local playerName = tostring(other.Parent)
  8.         local player = Players[playerName]
  9.         local enemyStat =
  10. player.leaderstats:WaitForChild("Score")
  11.         local looseStat =
  12. player.leaderstats:WaitForChild("Loose")
  13.         looseStat.Value += 1       
  14.         enemyStat.Value = 0
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement