Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Gamepass that changes your avatar + gives you my other gamepasses doesn't work?

Asked by 4 years ago

I have tried to make a gamepad which sells all my other game passes for a discount along with giving your avatar something.

Here is my script so far, please let me know where I made a mistake!

local gamepassId = 12077225 --- whatever your gamepass id is local mps = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(plr) if mps:UserOwnsGamePassAsync(plr.UserId,gamepassId)then plr.CharacterAdded:Connect(function(char) plr.Character.Humanoid.JumpPower = 70 wait(1) end) end end)

local gamepassId = 12077193 --- whatever your gamepass id is local mps = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(plr) if mps:UserOwnsGamePassAsync(plr.UserId,gamepassId)then plr.CharacterAdded:Connect(function(char) plr.Character.Humanoid.WalkSpeed = 25 wait(1) end) end end)

game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) local trail = game.ServerStorage.Trail:Clone() trail.Parent = char.Head local attachment0 = Instance.new("Attachment",char.Head) attachment0.Name = "TrailAttachment0" local attachment1 = Instance.new("Attachment",char.HumanoidRootPart) attachment1.Name = "TrailAttachment1" trail.Attachment0 = attachment0 trail.Attachment1 = attachment1 end) end)

game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) wait(2) local trail = char.Head.Trail local MarketPlaceService = game:GetService("MarketplaceService") local UserId = player.UserId local PlayerBoughtThisGamepass = MarketPlaceService:UserOwnsGamePassAsync(UserId, 12077246) -- Change to gamepassid

1    if PlayerBoughtThisGamepass then
2        trail.Enabled = true
3        trail.Lifetime = 5
4    else
5        trail.Enabled = false
6    end
7end)

end)

local gamepassId = 11723197 local service = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(player) if (service:UserOwnsGamePassAsync(player.UserId, gamepassId)) then local tags = { { TagText = "VIP", -- Tag TagColor = Color3.fromRGB(255, 255, 0) -- VIP Color } } local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner").ChatService) local speaker = nil while speaker == nil do speaker = ChatService:GetSpeaker(player.Name) if speaker ~= nil then break end wait(0.01) end speaker:SetExtraData("Tags",tags) speaker:SetExtraData("ChatColor",Color3.fromRGB(255, 255, 0)) -- Text Color end end)

local MarketPlaceService = game:GetService("MarketplaceService") local GamepassID = 12077213 -- The Gamepass ID

game.Players.PlayerAdded:Connect(function(player)

1if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, GamepassID) then
2 
3    game.ServerStorage.ClassicSword:Clone().Parent = player:WaitForChild("Backpack")
4    game.ServerStorage.ClassicSword:Clone().Parent = player:WaitForChild("StarterGear")
5end

end)

Player.Hat = 138932314

0
please use code blocks properly PolyyDev 214 — 4y
0
I do not know how to sorry. I am very new here! I will try! TheRageObby 0 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
01local gamepassId = 12077225 --- whatever your gamepass id is
02local mps = game:GetService("MarketplaceService")
03 
04game.Players.PlayerAdded:Connect(function(plr)
05    if mps:UserOwnsGamePassAsync(plr.UserId,gamepassId)then
06        plr.CharacterAdded:Connect(function(char)
07            plr.Character.Humanoid.JumpPower = 70
08            wait(1)
09        end)
10    end
11end)
12 
13local gamepassId = 12077193 --- whatever your gamepass id is
14local mps = game:GetService("MarketplaceService")
15 
View all 91 lines...
0
That is the peice of code I have! TheRageObby 0 — 4y
Ad

Answer this question