Sungmingamerpro13

ChargeOn/Off (Script)

Sep 19th, 2025 (edited)
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.74 KB | None | 0 0
  1. --- ChargeOn ---
  2.  
  3. local rs = game:GetService("ReplicatedStorage")
  4. local charge = rs.MusicBox:WaitForChild("ChargeON")
  5. local sCript = game.Workspace.AI.MusicBox:WaitForChild("Script")
  6.  
  7. charge.OnServerEvent:Connect(function(player, sCript)
  8.     game.Workspace.AI.MusicBox.Script.Disabled = true
  9.     game.Workspace.AI.MusicBox.ChargingScript.Disabled = false
  10. end)
  11.  
  12. --- ChargeOff ---
  13.  
  14. local rs = game:GetService("ReplicatedStorage")
  15. local nocharge = rs.MusicBox:WaitForChild("ChargeOFF")
  16. local ChargesCript = game.Workspace.AI.MusicBox:WaitForChild("ChargingScript")
  17.  
  18. nocharge.OnServerEvent:Connect(function(player, ChargesCript)
  19.     game.Workspace.AI.MusicBox.Script.Disabled = false
  20.     game.Workspace.AI.MusicBox.ChargingScript.Disabled = true
  21. end)
  22.  
Advertisement
Add Comment
Please, Sign In to add comment