This works by being parented to the ceiling part of a vault room, where loot is occasionally generated.
local Parent, Players, Folder, Coin, Color, Value = script.Parent, game:GetService("Players"), Instance.new("Folder"), Instance.new("Part"), {BrickColor.new(360), BrickColor.new(131), BrickColor.new(333)}, {10, 60, 200}
Folder.Name, Folder.Parent, Coin.Size, Coin.Material, Coin.Shape = Parent.Name, workspace, Vector3.new(0.125, 1, 1), Enum.Material.Metal, Enum.PartType.Cylinder
local Pos = Parent.Position+Vector3.new(-16, -2, 0)
repeat
local Coin, Num = Coin:Clone(), math.max(math.random(4)-1, 1)
local Light, Color = Instance.new("PointLight", Coin), Color[Num]
Light.Color, Light.Range, Coin.BrickColor, Coin.Position, Coin.Parent = Color.Color, 8, Color, Pos+Vector3.new(math.random()*32, 0, math.random()*40), Folder
Coin.Touched:Connect(function(Part)
local Char = Part:FindFirstAncestorOfClass("Model")
if not Char then return end
local Player = Players:GetPlayerFromCharacter(Char)
if not Player then return end
Coin:Destroy()
local Data = shared.Data
if not Data then return end
Data[Player][2] += Value[Num]
end)
task.wait((math.random()+1)/(Players.NumPlayers+1)*120)
until nil