generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How do i make it decline the Donate if not have money

Previous Thread :: Next Thread 
deadly3652 is not online. deadly3652
Joined: 17 Nov 2011
Total Posts: 268
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 is not online. Fribet
Joined: 08 Feb 2014
Total Posts: 700
25 Jul 2015 12:46 PM
if statement
Report Abuse
Fribet is not online. 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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image