I'm trying to make a gamepass that gives you devil powers. The way I'm trying to do it is by making a folder in server storage and then putting all the local scripts for the powers in that and then cloning it into the player backpack.
Heres my code
ServerStorage = game:GetService("ServerStorage") local id = 13229693
game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and id == ido then plr.Character.Humanoid.WalkSpeed = 20 end
end)
game.Players.PlayerAdded:Connect(function(plr)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id) then game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").WalkSpeed = 20 local Devil = ServerStorage:WaitForChild("Devil"):Clone() Devil.Parent = game.Players.LocalPlayer.BackPack end
end)