All pastes #637268 Raw Edit

Stuff

public lua v1 · immutable
#637268 ·published 2007-07-28 18:38 UTC
rendered paste body
function getGold(p)  local stats = p:findFirstChild("leaderstats")  local gold = stats:findFirstChild("Gold")  if (stats ~= nil) and (gold ~= nil) then   gold.Value = gold.Value + 50   return true  end  return false end function onTouched(hit)  local h = hit.Parent:findFirstChild("Humanoid")  if (h ~= nil) then   local player = game.Players.LocalPlayer    if getGold(player) == true then    script.Parent.Parent = nil    end   end  end endconnection = script.Parent.Touched:connect(onTouched)