Advertisement
Cakey3101

IslandBoost - ServerScript

Apr 6th, 2024
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | Source Code | 0 0
  1. local Workspace = game:GetService("Workspace")
  2. local Players = game:GetService("Players")
  3.  
  4. local IslandOne = Workspace.IslandOne.Base
  5. local IslandTwo = Workspace.IslandTwo.Base
  6. local IslandThree = Workspace.IslandThree.Base
  7. local IslandFour = Workspace.IslandFour.Base
  8.  
  9. IslandOne.Touched:Connect(function(otherPart: BasePart)
  10.     local player = Players:GetPlayerFromCharacter(otherPart.Parent)
  11.     if player then
  12.         player.Islands.IslandBoost.Value = 1
  13.     end
  14. end)
  15.  
  16. IslandTwo.Touched:Connect(function(otherPart: BasePart)
  17.     local player = Players:GetPlayerFromCharacter(otherPart.Parent)
  18.     if player then
  19.         player.Islands.IslandBoost.Value = 1.1
  20.     end
  21. end)
  22.  
  23. IslandThree.Touched:Connect(function(otherPart: BasePart)
  24.     local player = Players:GetPlayerFromCharacter(otherPart.Parent)
  25.     if player then
  26.         player.Islands.IslandBoost.Value = 1.2
  27.     end
  28. end)
  29.  
  30. IslandFour.Touched:Connect(function(otherPart: BasePart)
  31.     local player = Players:GetPlayerFromCharacter(otherPart.Parent)
  32.     if player then
  33.         player.Islands.IslandBoost.Value = 1.3
  34.     end
  35. end)
Tags: Roblox lua coding
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement