Advertisement
PlayStationUser99

How to make a halo system! | Part 2 (Halo change script)

Apr 24th, 2022
1,385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. -- Replace OrangeHalo with the halo you want to swap out
  2. -- Replace "PurpleHalo" and "GreenHalo" with the OTHER halos you have.
  3.  
  4. script.Parent.MouseButton1Click:Connect(function()
  5.     local halo = game.ServerStorage.OrangeHalo:Clone()
  6.     if script.Parent.Parent.Parent.Parent.Parent.Character then
  7.         if not script.Parent.Parent.Parent.Parent.Parent.Character:FindFirstChild("GreenHalo") and not script.Parent.Parent.Parent.Parent.Parent.Character:FindFirstChild("PurpleHalo") then
  8.             halo.Parent = script.Parent.Parent.Parent.Parent.Parent.Character
  9.         else
  10.             if script.Parent.Parent.Parent.Parent.Parent.Character:FindFirstChild("GreenHalo") then
  11.                 local removehalo = script.Parent.Parent.Parent.Parent.Parent.Character:FindFirstChild("GreenHalo")
  12.                 halo.Parent = script.Parent.Parent.Parent.Parent.Parent.Character
  13.                 removehalo:Destroy()
  14.             elseif script.Parent.Parent.Parent.Parent.Character:FindFirstChild("PurpleHalo") then -- Keep copy-pasting this for how many halos you have
  15.                 local removehalo = script.Parent.Parent.Parent.Parent.Parent.Character:FindFirstChild("PurpleHalo")
  16.                 halo.Parent = script.Parent.Parent.Parent.Parent.Parent.Character
  17.                 removehalo:Destroy()
  18.             end
  19.         end
  20.     end
  21. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement