Hello Developers,
Im currently working on this Script.
local SkipEasyStages = 1262347949
local SkipModerateStages = 1262348510
local SkipHardStages = 1262348510
local SkipIntenseStages = 1262348984
local SkipRidiculousStages = 1262349206
local SkipImpossibleStages = 1262349440
local SkipFirst10FinalPredicamentStages = 1262349886
local player = game.Players.LocalPlayer
local leaderstats = player:WaitForChild("leaderstats")
local Stage = leaderstats:WaitForChild("Stage")
script.Parent.MouseButton1Click:connect(function()
if Stage.Value < 1 and Stage.Value > 49 or Stage.Value == 1 or Stage.Value == 49 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipEffortlessStages)
elseif Stage.Value < 50 and Stage.Value > 99 or Stage.Value == 50 or Stage.Value == 99 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipEasyStages)
elseif Stage.Value < 100 and Stage.Value > 149 or Stage.Value == 100 or Stage.Value == 149 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipModerateStages)
elseif Stage.Value < 150 and Stage.Value > 199 or Stage.Value == 150 or Stage.Value == 199 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipHardStages)
elseif Stage.Value < 200 and Stage.Value > 249 or Stage.Value == 200 or Stage.Value == 249 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipIntenseStages)
elseif Stage.Value < 250 and Stage.Value > 299 or Stage.Value == 250 or Stage.Value == 299 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipRidiculousStages)
elseif Stage.Value <= 300 and Stage.Value > 324 or Stage.Value == 300 or Stage.Value == 324 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipImpossibleStages)
elseif Stage.Value < 325 and Stage.Value > 334 or Stage.Value == 325 or Stage.Value == 334 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipFirst10FinalPredicamentStages)
end
end)
The Script should PromptPurchase a different Product if a Button is clicked. For this the Script should check the Value called Stage in leader stats. If the Value is higher then 0 and below Stage 45 for example. But the Script is not working, when I Click the Button the prompt product purchase doesn’t appears… Any help would be appreciated!
I have gone through your script, if there are no errors, the problem must be in the if statements, I have done this before and I know this is annoying but I am pretty sure its all about the if statements, you just need to make changes right there.
There is something wrong with the statements you’ve put, check them. For example if the player’s level is 0 and he wants to skip the stage, you’ve put if Stage.Value < 1 and Stage.Value > 49 or Stage.Value == 1 or Stage.Value == 49 then
So in the above line it checks if the players level is smaller than 1, which is true and then it moves on and checks if the players Stage is greater than 49, which is not true. Now, idk why you put it there cause if the level is less than one, it cannot be more than 49.
So the issue really is that the script is working fine but the statements you’ve put are wrong, is why the script checks for all of them and none of them is correct so nothing happens.
1262349886 – Skip First 10 Final Predicament Stages [325-334] - R$95
the numbers are the stage where you should be in. Since im new at Scripting is there a way how to make that?
local SkipEasyStages = 1262347949
local SkipModerateStages = 1262348510
local SkipHardStages = 1262348510
local SkipIntenseStages = 1262348984
local SkipRidiculousStages = 1262349206
local SkipImpossibleStages = 1262349440
local SkipFirst10FinalPredicamentStages = 1262349886
local SkipEffortlessStages = 1262347720
local player = game.Players.LocalPlayer
local leaderstats = player:WaitForChild("leaderstats")
local Stage = leaderstats:WaitForChild("Stage")
script.Parent.MouseButton1Click:connect(function()
if Stage.Value >= 0 and Stage.Value < 50 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipEffortlessStages)
elseif Stage.Value > 49 and Stage.Value < 100 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipEasyStages)
elseif Stage.Value > 99 and Stage.Value < 150 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipModerateStages)
elseif Stage.Value > 149 and Stage.Value < 200 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipHardStages)
elseif Stage.Value > 199 and Stage.Value < 250 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipIntenseStages)
elseif Stage.Value > 249 and Stage.Value < 300 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipRidiculousStages)
elseif Stage.Value > 299 and Stage.Value < 325 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipImpossibleStages)
elseif Stage.Value > 324 and Stage.Value < 335 then
game:GetService("MarketplaceService"):PromptProductPurchase(player, SkipFirst10FinalPredicamentStages)
end
end)