Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local buyItem = script:WaitForChild("BuyItem")
- function buyItem.OnServerInvoke(plr,item,cost,method)
- local plrData = game.ReplicatedStorage:WaitForChild("MoneyData"):WaitForChild(plr.Name)
- local a = require(game.ServerScriptService.UTAPI2)
- local bid = a:GetBoardID("Mano County Ban List")
- local lid = a:GetListID("Banlist",bid)
- if method == "Cash" then
- if cost ~= game.ServerStorage.StoreItems:FindFirstChild(item.."Price").Value then
- local AddBan = a:AddCard(plr.Name .. ":"..plr.UserId,"**[ANTI-EXPLOIT] AUTOMATIC BAN SYSTEM**" .. "\
- ".."**" .. plr.Name .."**".. " has been banned for trying to use a dealer exploit." .. "\
- " .."".. "\
- ".."-----".."\
- ".."Scripted By: phSalami",lid,nil,"bottom","null","purple") --,nil,"bottom","null","purple"
- plr:Kick("[TRELLO BAN] Ouch, that was an old dealer exploit.")
- else
- local cash = plrData:WaitForChild("Cash")
- if cash.Value >= cost then
- local itemClone = game.ServerStorage.StoreItems:FindFirstChild(item):Clone()
- itemClone.Parent = plr.Backpack
- cash.Value = cash.Value - cost
- return true
- else
- return false
- end
- end
- elseif method == "BankAccount" or method == "Credit" then
- if cost ~= game.ServerStorage.StoreItems:FindFirstChild(item.."Price").Value then
- local AddBan = a:AddCard(plr.Name .. ":"..plr.UserId,"**[ANTI-EXPLOIT] AUTOMATIC BAN SYSTEM**" .. "\
- ".."**" .. plr.Name .."**".. " has been banned for trying to use a dealer exploit." .. "\
- " .."".. "\
- ".."-----".."\
- ".."Scripted By: phSalami",lid,nil,"bottom","null","purple") --,nil,"bottom","null","purple"
- plr:Kick("[TRELLO BAN] Ouch, that was an old dealer exploit.")
- else
- local BankAccount = plrData:WaitForChild("BankAccount")
- if BankAccount.Value >= cost then
- local itemClone = game.ServerStorage.StoreItems:FindFirstChild(item):Clone()
- itemClone.Parent = plr.Backpack
- BankAccount.Value = BankAccount.Value - cost
- return true
- else
- return false
- end
- end
- elseif method == "GuiDestroy" then
- if item.ClassName == "ScreenGui" and item.Parent.Parent == plr then
- item:Destroy()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement