StorylifeJoin Date: 2010-11-27 Post Count: 19373 |
game.StarterGui.ResetPlayerGuiOnSpawn = false
local MarketplaceService = game:GetService("MarketplaceService")
function getPlayerFromId(id)
for i,v in pairs(game.Players:GetChildren()) do
if v.userId == id then
return v
end
end
return nil
end
MarketplaceService.ProcessReceipt = function(receiptInfo)
local productId = receiptInfo.ProductId
local playerId = receiptInfo.PlayerId
local player = getPlayerFromId(playerId)
local productName
if productId == 91528845 then
productName = "$1,000!"
local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name)
if cashmoney then
cashmoney.Value = cashmoney.Value + 1000
end
it lets me buy it but it does not give me the cash
|
|
StorylifeJoin Date: 2010-11-27 Post Count: 19373 |
bbb
|
|
|
Perhaps there is more help to get by posting this in the scripters forum, sorry I could not help more. |
|
|
INOOBE_YTJoin Date: 2014-02-08 Post Count: 5067 |
How much u offering? :3
|
|
AirLonzoJoin Date: 2015-09-18 Post Count: 21845 |
if productId == [ID] then
local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
if cashmoney then
cashmoney.Value = cashmoney.Value + 1000
end
put this script in server script storage
|
|
StorylifeJoin Date: 2010-11-27 Post Count: 19373 |
do i put it in my existing script or as a new one ?
|
|
|
OK I will be your scripter I know a little bit! And check out my games if you would like just go on my creations and click escape prison (beta)
|
|
|
Sometimes a use Roblox models I do it so I will know what I want it to look like oh and my brother knows more scripting then me his username is Masked_Spider |
|
|
AirLonzoJoin Date: 2015-09-18 Post Count: 21845 |
NEW |
|
StorylifeJoin Date: 2010-11-27 Post Count: 19373 |
Plestro it didnt work :/
|
|
v_eryJoin Date: 2013-05-21 Post Count: 532 |
copy and paste the output
|
|
StorylifeJoin Date: 2010-11-27 Post Count: 19373 |
18:58:46.036 - ServerScriptService.DevProductHandler:42: unexpected symbol near '='
18:58:46.037 - ServerScriptService.developer script:6: 'end' expected (to close 'if' at line 1) near
|
|
StorylifeJoin Date: 2010-11-27 Post Count: 19373 |
help
|
|
StorylifeJoin Date: 2010-11-27 Post Count: 19373 |
kwwerkterkertekerk
|
|
drager980Join Date: 2009-05-25 Post Count: 13385 |
-- Place this in ServerScriptStoragge thing or whatever
local MarketplaceService = game:GetService("MarketplaceService")
function getPlayerFromId(id)
for _,player in pairs(game.Players:GetPlayers()) do
if player.UserId == id then
return player
end
end
return false
end
function MarketplaceService.ProcessReceipt(receiptInfo)
local productId = receiptInfo.ProductId
local playerId = receiptInfo.PlayerId
local player = getPlayerFromId(playerId)
local productName
if productId == 91528845 then
local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name)
if cashmoney then
cashmoney.Value = cashmoney.Value + 1000
else
print("You do not have an object in ServerStorage.MoneyStorage for the player"
end
end
end
|
|
StorylifeJoin Date: 2010-11-27 Post Count: 19373 |
thank you for the help, but do i place that in my current script or in a new one ?
|
|