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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Club Houses » Clans & Guilds
Home Search
 

Re: ;o

Previous Thread :: Next Thread 
Ragnarope is not online. Ragnarope
Joined: 12 Jul 2014
Total Posts: 3852
14 Aug 2014 02:12 AM
game.StarterGui:SetCoreGuiEnabled("All", false)

local items = require(Workspace.ItemInfo)

local result = script.Parent.Parent:WaitForChild("Result")

function getItem(name)
for _, item in pairs(items) do
for _, v in pairs(item.name) do
if v:lower() == name:lower() then
return item
end
end
end
return false
end

function comma(amount)
local formatted = tostring(amount)
while true do
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
if k == 0 then
break
end
end
return formatted
end

function add(tab)
local count = 0
for i, v in pairs(tab) do
count = count + v
end
return count
end

script.Parent.MouseButton1Click:connect(function()
local give, get = {}, {}
for i, v in pairs(script.Parent.Parent:GetChildren()) do
if v.Name:sub(1, 3) == "Get" then
if not tonumber(v.Text) then
local item = getItem(v.Text:lower())
if item then
table.insert(get, item.value)
v.Text = item.name[1] .. " ( R$ " .. item.value .. " )"
elseif not v.Text:find("Item") and not v.Text == "Robux" and v.Text:len() > 0 then
v.Text = "ERROR : Unknown item!"
else
v.Text = ""
end
else
table.insert(get, tonumber(v.Text))
end
elseif v.Name:sub(1, 4) == "Give" then
if not tonumber(v.Text) then
local item = getItem(v.Text:lower())
if item then
table.insert(give, item.value)
v.Text = item.name[1] .. " ( R$ " .. item.value .. " )"
elseif not v.Text:find("Item") and not v.Text == "Robux" and v.Text:len() > 0 then
v.Text = "ERROR : Unknown item!"
else
v.Text = ""
end
else
table.insert(give, tonumber(v.Text))
end
end
end
local giveR, getR = add(give), add(get)
local profit = getR - giveR
if profit > 500 then
result.Text = "Accept : You will earn ~R$" .. comma(profit) .. "."
result.TextColor3 = Color3.new(0, 1, 0)
else
result.Text = "Decline : You will lose ~R$" .. comma(profit * -1) .. "."
result.TextColor3 = Color3.new(1, 0, 0)
end
end)
Report Abuse
UntoTheBreach is not online. UntoTheBreach
Joined: 19 Apr 2010
Total Posts: 28897
14 Aug 2014 02:13 AM
and this does what exactly
Report Abuse
Ragnarope is not online. Ragnarope
Joined: 12 Jul 2014
Total Posts: 3852
14 Aug 2014 02:15 AM
that is highly classified information
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