|
| 29 Apr 2015 09:45 AM |
local T-shirt = 224985600 local Guns = { ["Kimber"] = { Amount = 450; Image = 0; }; ["Lucky"] = { Amount = 1000; Image = 0; }; ["M110"] = { Amount = 50000; Image = 0; }; ["M14"] = { Amount = 1400; Image = 0; }; ["MK11"] = { Amount = 1500; Image = 0; }; ["MK12"] = { Amount = 1800; Image = 0; }; ["M500"] = { Amount = 1750; Image = 0; }; ["Welsh Knife"] = { Amount = 900; Image = 0; }; ["Mauser"] = { Amount = 1000; Image = 0; }; ["Auto5"] = { Amount = 900; Image = 0; }; ["Engraved Knife"] = { Amount = 900; Image = 0; }; }
Comma = function(x) local a = x while true do a, k = string.gsub(a, "^(-?%d+)(%d%d%d)", '%1,%2') if k == 0 then break end end return a end
script.Parent.Touched:connect(function(Part) local Player = Game.Players:GetPlayerFromCharacter(Part.Parent) Spawn(function() if Player and Game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, GamePass) or Game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 171367355) then if not Player.PlayerGui:FindFirstChild("GunGui") then local CurrentValue = "" for i, v in next, Guns do CurrentValue = i break end local Gui = script.GunGui:Clone() Gui.Parent = Player.PlayerGui local Holder = Gui.Holder local ScrollingFrame = Holder.ScrollingFrame local HowMany = 0 for i, v in next, Guns do HowMany = HowMany + 1 end ScrollingFrame.CanvasSize = UDim2.new(0,0,0,5 + (35 * HowMany)) local Buy = Holder.Buy Buy.MouseButton1Down:connect(function() if Player.Character:FindFirstChild("Wallet") and Game.Lighting:FindFirstChild(CurrentValue) and Player.Character.Wallet.Value >= Guns[CurrentValue].Amount then Player.Character.Wallet.Value = Player.Character.Wallet.Value - Guns[CurrentValue].Amount Game.Lighting:FindFirstChild(CurrentValue):Clone().Parent = Player.Backpack end end) local Close = Holder.Close Close.MouseButton1Down:connect(function() Gui:Destroy() end) local Thumbnail = Holder.Thumbnail local Amount = Holder.Amount local GunName = Holder.GunName Switch = function() Thumbnail.Image = "http://www.roblox.com/asset/?id=" .. Guns[CurrentValue].Image Amount.Text = "$" .. Comma(Guns[CurrentValue].Amount) GunName.Text = CurrentValue end Switch() local Count = 0 for i, v in next, Guns do local Sample = Instance.new("TextButton", ScrollingFrame) Sample.Name = i Sample.Position = UDim2.new(0, 5, 0, 5 + (35 * Count)) Sample.Size = UDim2.new(0, 130, 0, 30) Sample.BackgroundColor3 = Color3.new(0, 0, 0) Sample.BorderSizePixel = 0 Sample.Text = i Sample.Font = Enum.Font.SourceSans Sample.FontSize = Enum.FontSize.Size14 Sample.TextColor3 = Color3.new(1, 1, 1) Sample.MouseButton1Down:connect(function() CurrentValue = i Switch() end) Count = Count + 1 end end else Game:GetService("MarketplaceService"):PromptPurchase(Player, GamePass) end end) end)
|
|
|
| Report Abuse |
|
sly37
|
  |
| Joined: 21 Dec 2011 |
| Total Posts: 1565 |
|
| |
|
| 29 Apr 2015 09:57 AM |
| Like, Instead off it being gamepass How do I make it into a T-shirt pass. |
|
|
| Report Abuse |
|
|
| 29 Apr 2015 11:30 AM |
"T-shirt script" "T-shirt pass" I am not sure what you mean, perhaps learn some English, so I am giving a link to everything instead: http://wiki.roblox.com/index.php?title=API:Class_reference
pls play me place: http://www.roblox.com/my-place?id=1081377 |
|
|
| Report Abuse |
|