Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ReplicatedStorage = game:GetService("ReplicatedStorage");
- local ApplyEvent = ReplicatedStorage.Events.JobService
- local Jobs = require(ReplicatedStorage.Modules.Jobs)
- local Players = game:GetService("Players")
- local Player = Players.LocalPlayer
- local Chat = Player.PlayerGui.Chat.Frame.ChatChannelParentFrame["Frame_MessageLogDisplay"].Scroller
- local gotJob = false
- Chat.ChildAdded:Connect(function (child)
- if child:IsA("Frame") and child:FindFirstChild("TextLabel") then
- if child:FindFirstChild("TextLabel").Text == "You already have a job!" then
- gotJob = true
- end
- end
- end)
- while not gotJob do
- task.wait(0.5)
- for _, job in pairs(Jobs.Occupations) do
- ApplyEvent:FireServer("Apply", job)
- if gotJob then
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement