Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- beginning of the credit handler where the modifying credits if the player is in the group or not
- -- CreditHandler
- -- Bulldo344
- -- Created on August 24, 2021
- -- services & locations
- local Player = game.Players.LocalPlayer
- local Credits = Player:WaitForChild("Data"):WaitForChild("Credits")
- local RunService = game:GetService("RunService")
- local Notification = game.ReplicatedStorage.Notification.NotificationUI
- -- functions
- script.Parent.CreditTex.TextLabel.Text = "Credits: " .. Credits.Value
- function Update()
- script.Parent.CreditTex.TextLabel.Text = "Credits: " .. Credits.Value
- Notification.Frame.Frame.Text.Text = "Gave you credits & updated them them for you!"
- Notification.Enabled = true
- Notification.Parent = Player.PlayerGui
- end
- function addCred()
- --if RunService:IsStudio() then
- -- return
- --end
- while task.wait(5) do
- if Player:IsInGroup(00) then
- Player:WaitForChild("Data"):WaitForChild("Credits").Value += 100
- Update()
- print("Updated & Given people that are in the group their credits every 1 minute. [InGroup]")
- task.wait(5)
- Notification.Enabled = false
- else
- Player:WaitForChild("Data"):WaitForChild("Credits").Value += 50
- Update()
- print("Updated & Given people that are not in the group their credits every 1 minute.")
- task.wait(5)
- Notification.Enabled = false
- end
- end
- end
- addCred()
- Update()
- -- ending of the credit handler where the modifying credits if the player is in the group or not
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement