Advertisement
Cakey3101

Coins Script - Part 7!

Apr 16th, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | Source Code | 0 0
  1. local Workspace = game:GetService("Workspace")
  2. local Players = game:GetService("Players")
  3.  
  4. Cooldown = false
  5.  
  6. Workspace.IslandOne["Shops!"].CoinShop.OpenPart.Touched:Connect(function(otherPart: BasePart)
  7.     if not Cooldown then
  8.         Cooldown = true
  9.         if Players:GetPlayerFromCharacter(otherPart.Parent) then
  10.             local Player = Players:GetPlayerFromCharacter(otherPart.Parent)
  11.             Player.leaderstats.Coins.Value += Player.Points.Value
  12.             Player.Points.Value = 0
  13.         end
  14.         wait(2)
  15.         Cooldown = false
  16.     end
  17. end)
Tags: lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement