|
| 25 Jul 2015 12:44 PM |
game.Players.LocalPlayer.leaderstats.Money.Value = game.Players.LocalPlayer.leaderstats.Money.Value - script.Parent.Donating.HM.Text wait(1) game.Players[script.Parent.Donating.Person.Text].leaderstats.Money.Value = game.Players[script.Parent.Donating.Person.Text].leaderstats.Money.Value + script.Parent.Donating.HM.Text
how do i make the money transfer stop if they don't have the money cause somone will just donate 999999999999 to somone |
|
|
| Report Abuse |
|
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
| |
|
Fribet
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 700 |
|
|
| 25 Jul 2015 12:47 PM |
if game.Players.LocalPlayer:WaitForChild("leaderstats").Money.Value => 1000 then
end |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 25 Jul 2015 12:48 PM |
local player = game.Players.LocalPlayer local stats = player:WaitForChild("leaderstats") local cash = stats:WaitForChild("Cash") local gui = script.Parent
if cash.Value >= tonumber(gui.Text) then cash.Value = cash.Value - tonumber(gui.Text) end
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
2JJ1
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 1571 |
|
|
| 25 Jul 2015 12:48 PM |
cost = 99999999999
if cost <= donated then print("Rejected mother intercourser!") end
Shud give you an idea. |
|
|
| Report Abuse |
|
|
baldo46
|
  |
| Joined: 28 Jul 2008 |
| Total Posts: 1254 |
|
|
| 25 Jul 2015 12:52 PM |
local Players = game.Players; local plr = Players.LocalPlayer; local sp = script.Parent.Donating;
local amt = tonumber(sp.HM.Text); local toplr = Players[sp.Person.Text];
if plr.leaderstats.Money.Value >= amt and toplr ~= nil then plr.leaderstats.Money.Value = plr.leaderstats.Money.Value - amt; wait(1); toplr.leaderstats.Money.Value = toplr.leaderstats.Money.Value + amt; end |
|
|
| Report Abuse |
|
|