I'm fairly new to scripting and I'm making a Obby, I'm trying to figure out a way to have a "Easy Mode" which would be not taking damage to KillBricks if you have a specific gamepass I'm also trying to make a GUI where you can toggle a button to turn Easy Mode on and off (only gamepass owners can use this feature)
script.Parent.Touched:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
end
end)
This is my killbrick script which works fine ^^^
local Id = 45525748
game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and Id == ido then
game.Workspace.Killpart.Script.Disabled = true
end
end)
game.Players.PlayerAdded:Connect(function(plr)
if game:GetService("MarketplaceService")UserOwnsGamePassAsync(plr.UserId.Id) then
game.Workspace.Killpart.Script.Disabled = true
end
end)
This was my previous script trying to make it It didn't work AT ALL either maybe someone could help me fix this script or just give me idea's

1 comment
add a Humanoid:TakeDamage(100) for ur first script instead of setting the player's health to 0, and for your other script make add a Humanoid:TakeDamage(0). this is easier than disabling the script