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

help giving a player an effect if they have a pass?

Asked by 10 years ago
local player = script.Parent.Parent
local sparklesPass = 194931606
local firePass = 194930756

function sparklesisAuthenticated(player)
    return game:GetService("GamePassService"):PlayerHasPass(player, sparklesPass)
end

function fireisAuthenticated(player)
    return game:GetService("GamePassService"):PlayerHasPass(player, firePass)
end

while wait() do
    if sparklesisAuthenticated(player) then
        local torso = player:FindFirstChild("Torso")
        if torso then
            local sparkles = Instance.new("Sparkles", torso)
            sparkles.SparkleColor = Color3.new(1, 1, 1)
        end
    end
    if fireisAuthenticated(player) then
        local torso = player:FindFirstChild("Torso")
        if torso then
            local fire = Instance.new("Fire", torso)
            fire.Color = Color3.new(0, 170/255, 1)
            fire.SecondaryColor = Color3.new(0, 0, 0)
            fire.Heat = 25
            fire.Size = 10
        end
    end
end

This script is inside StarterPack, and I want to give the player an effect if they have the passes, I don't know why it doen't work.

0
By the way, on my question, I wasn't requesting anything. Please vote be back up. RedCombee 585 — 10y
0
why comment on here? NinjoOnline 1146 — 10y

Answer this question