Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local roleSelectionGui = script.Parent -- Assuming this script is placed inside
- local randomButton = roleSelectionGui.RandomButton
- local roleTextLabel = roleSelectionGui.RoleTextLabel
- local roles = { "Survivor", "Detective", "Vampire" }
- local function assignRandomRole()
- local randomIndex = math.random(1, #roles)
- local selectedRole = roles[randomIndex]
- -- Implement your custom logic based on the selected role here.
- -- For example, you can set player properties or grant abilities/tools based on the role.
- roleTextLabel.Text = "You are a " .. selectedRole
- end
- randomButton.MouseButton1Click:Connect(assignRandomRole)
Advertisement
Add Comment
Please, Sign In to add comment