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 » Club Houses » Clans & Guilds
Home Search
 

Re: Easy, quick money for easy script

Previous Thread :: Next Thread 
ImperialDesire is not online. ImperialDesire
Joined: 10 Mar 2014
Total Posts: 2722
26 Dec 2016 11:38 AM
500 R$ right now for anyone that can make a script to limit the number of tools someone has.

The goal is to prevent duplication of tools, not to limit the exact amount. Limit someone from having a certain number of any one type of tool (specifically a tool called "AR2") rather than actually limit the number of tools allowed in someone's inventory.

Thanks!
Report Abuse
ImperialDesire is not online. ImperialDesire
Joined: 10 Mar 2014
Total Posts: 2722
26 Dec 2016 11:41 AM
b1
Please reply to this if you are working on it.

Make a model with the script and a t-shirt for 500R$ when done.
Report Abuse
GGGGG14 is not online. GGGGG14
Joined: 29 Jan 2012
Total Posts: 25344
26 Dec 2016 11:42 AM
-- Local Script in StarterPlayerScripts or StarterGui

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Backpack = Player:WaitForChild("Backpack")

local function LimitTool(toolName)

Backpack.ChildAdded:connect(function(childObj)
if childObj.Name == toolName then
childObj:Destroy()
else print(childObj.Name.." added to "..Player.Name.."'s backpack, but not 'AR2'")
end
end)

end

LimitTool("AR2")
Report Abuse
TheSparkletimeZombie is not online. TheSparkletimeZombie
Joined: 13 May 2016
Total Posts: 1124
26 Dec 2016 11:42 AM
done

print("no)


cow goes moo
Report Abuse
TheSparkletimeZombie is not online. TheSparkletimeZombie
Joined: 13 May 2016
Total Posts: 1124
26 Dec 2016 11:42 AM
oops error :(


cow goes moo
Report Abuse
GGGGG14 is not online. GGGGG14
Joined: 29 Jan 2012
Total Posts: 25344
26 Dec 2016 11:47 AM
I totally forgot about limiting the number of AR2, I just made it impossible to get an AR2 lol... Here:

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Backpack = Player:WaitForChild("Backpack")

local function GetNumAR2()
local AR2 = {}
for i, obj in pairs(Backpack:GetChildren()) do
if obj.Name == "AR2" then
table.inser(obj, AR2)
end
end
return (#AR2)
end

local function LimitTool(maxQuantity)
Backpack.ChildAdded:connect(function(childObj)
if childObj.Name == "AR2" and GetNumAR2() >= maxQuantity then
childObj:Destroy()
else print(childObj.Name.." added to "..Player.Name.."'s backpack, but not 'AR2'.")
end
end)
end

LimitTool(1) -- Makes it so you can only have 1 AR2
Report Abuse
GGGGG14 is not online. GGGGG14
Joined: 29 Jan 2012
Total Posts: 25344
26 Dec 2016 11:47 AM
-- should be table.insert(obj, AR2)

I typo'd
Report Abuse
ImperialDesire is not online. ImperialDesire
Joined: 10 Mar 2014
Total Posts: 2722
27 Dec 2016 12:01 PM
Make a t-shirt? I appreciate it a lot.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • 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