-- Auto-detect parts by name or tag local function scanObby() for _, part in ipairs(workspace:GetDescendants()) do if part:IsA("BasePart") then if part.Name:lower():find("checkpoint") or part:GetAttribute("Type") == "Checkpoint" then setupPart(part, "Checkpoint") elseif part.Name:lower():find("kill") or part:GetAttribute("Type") == "Kill" then setupPart(part, "KillPart") elseif part.Name:lower():find("win") or part:GetAttribute("Type") == "Win" then part.Touched:Connect(function(hit) local char = hit.Parent if char and char:FindFirstChild("Humanoid") then local player = Players:GetPlayerFromCharacter(char) if player and not rewardedPlayers[player.UserId] then rewardedPlayers[player.UserId] = true remoteEvent:FireClient(player, UGC_ASSET_ID, REWARD_MESSAGE) end end end) end end end end
Here’s a ready-to-use for Roblox, designed for a FREE UGC experience. This script automatically handles an obstacle course (obby) with checkpoints, kill parts, win rewards, and UGC delivery logic. 🔧 Full Script (Place in ServerScriptService or a Script inside the workspace) --[[ FREE UGC OBBY SCRIPT - Auto obby handling - Checkpoints & kill parts - UGC reward on win - Works with any UGC asset ID ]] local UGC_ASSET_ID = 1234567890 -- CHANGE THIS to your UGC item ID local REWARD_MESSAGE = "🎁 You won a free UGC item! Check your inventory." -FREE UGC- Obby For UGC- OP SCRIPT -AUTO OBBY-...
-- Create remote events (if not exist) local remoteEvent = Instance.new("RemoteEvent") remoteEvent.Name = "UGCRewardEvent" remoteEvent.Parent = ReplicatedStorage -- Auto-detect parts by name or tag local
clientScript.Source = [[ local player = game.Players.LocalPlayer local remote = game:GetService("ReplicatedStorage"):FindFirstChild("UGCRewardEvent") if not remote then return end Check your inventory
-- === CLIENT SIDE REWARD HANDLER === local clientScript = Instance.new("LocalScript") clientScript.Name = "UGCClientHandler" clientScript.Parent = ReplicatedStorage