Advertisement
HowToRoblox

NotificationSender

Feb 4th, 2020
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local re = game.ReplicatedStorage:WaitForChild("OnOwnerJoined")
  2.  
  3.  
  4. local function callback(text)
  5.    
  6.     if text == "Yes!" then
  7.        
  8.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 50
  9.  
  10.     end
  11. end
  12.  
  13.  
  14. local bindableFunction = Instance.new("BindableFunction")
  15. bindableFunction.OnInvoke = callback
  16.  
  17.  
  18. re.OnClientEvent:Connect(function()
  19.    
  20.     game.StarterGui:SetCore("SendNotification",
  21.         {
  22.            
  23.         Title = "Owner has joined!";
  24.         Text = "Do you want extra walk speed?";
  25.    
  26.         Icon = "rbxassetid://156507320";
  27.    
  28.         Duration = 10;
  29.    
  30.         Callback = bindableFunction;
  31.    
  32.         Button1 = "Yes!";
  33.         Button2 = "No!"
  34.    
  35.         }
  36.     )
  37.  
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement