|
| 30 Jun 2015 05:21 PM |
I want it to kill you and set you in the team "CIA" if you own the gamepass 264019915 And if you dont have the gamepass, it prompts the marketplace to bring the gamepass up and ask if u wanna buy thanks in advance!
OUTPUT; 13:41:24.841 - Players.Player.PlayerGui.ChooseTeam.Frame.CIA.Script:7: 'then' expected near '='
NEW SCRIPT; local id = 264019915
game.Players.PlayerAdded:connect(function(player) if not game:GetService("MarketplaceService"):PlayerOwnsAsset(player, id) then if player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function() Game:GetService("MarketplaceService"):PromptProductPurchase(player, id) end script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0 end script.Parent.MouseButton1Click:connect(onButtonClicked) print(player.Name .. " has the gamepass and has received birth...")
team = game.Teams["CIA"]
local function onButtonClicked() player.TeamColor = team.TeamColor end
script.Parent.MouseButton1Down:connect(onButtonClicked) end)
fartyburp, Scripting Guru and 3 Year Building Veteran, kiss kiss |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2015 05:31 PM |
b1
fartyburp, Scripting Guru and 3 Year Building Veteran, kiss kiss |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2015 05:48 PM |
b2
fartyburp, Scripting Guru and 3 Year Building Veteran, kiss kiss |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2015 05:49 PM |
So much unneeded stuff. Where exactly is this located? Why is there a "player" variable when it's already defining "player"? Why is there a "script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid" when you can just say player.Character.Humanoid? Why is their an if instead of else? Why is there a script.Parent? If you put that in a button, try this instead. MAKE SURE IT'S A LOCALSCRIPT.
wait(1) local player = game.Players.LocalPlayer repeat wait() until player.Character repeat wait() until player.Character.Humanoid local id = 264019915
if not game:GetService("MarketplaceService"):PlayerOwnsAsset(player, id) then script.Parent.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(player, id) player.Character.Humanoid.Health = 0 end) else script.Parent.MouseButton1Click:connect(function() print(player.Name .. " has the gamepass and has received birth...") local team = game.Teams["CIA"] player.TeamColor = team.TeamColor end) end |
|
|
| Report Abuse |
|
|