Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function notify(txt,who,style,interval,interval2)
- plr = game.Players:FindFirstChild(who)
- print("Starting...")
- if plr~=nil then
- print("Player found!")
- gui = plr.PlayerGui:findFirstChild("Notify")
- if gui~=nil then
- print("Gui found!")
- iu = gui.Main.InUse
- if iu.Value == false then
- print("Not in use!")
- iu.Value = true
- gui.Main.Button.Text = txt.."!"
- gui.Main:TweenPosition(UDim2.new(0.25,0,0.3,0),"Out",style,interval,false)
- wait(interval2)
- gui.Main:TweenPosition(UDim2.new(0.25,0,-0.3,0),"In",style,interval,false)
- wait(interval)
- iu.Value = false
- elseif iu.Value == true then
- print("In use, waiting..")
- repeat
- wait(1)
- until
- iu.Value == false
- iu.Value = true
- gui.Main.Button.Text = txt.."!"
- gui.Main:TweenPosition(UDim2.new(0.25,0,0.3,0),"Out",style,interval,false)
- wait(interval2)
- gui.Main:TweenPosition(UDim2.new(0.25,0,-0.3,0),"In",style,interval,false)
- wait(interval)
- iu.Value = false
- end
- print("Done!")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement