Advertisement
MildlyGaming

Acers Following Script

Aug 11th, 2022
605
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.95 KB | None | 0 0
  1. --Variables
  2.  
  3. local char = script.Parent
  4. local plr = game:GetService("Players"):GetPlayerFromCharacter(char)
  5.  
  6. local eqAcer = plr:WaitForChild("EquippedAcer")
  7.  
  8. --Acer Follow Functions
  9.  
  10. local function AcerFollows(Acer, AN) -- AN = AcerName. Acer = Acer Object
  11.     local clone = Acer:Clone()
  12.     clone.Parent = char
  13.    
  14.     clone.Name = "Acer"
  15.    
  16.     local hum = clone:WaitForChild("HumanoidRootPart")
  17.    
  18.     local atch1 = Instance.new("Attachment", hum)
  19.     atch1.Name = "Attachment1"
  20.    
  21.     hum:WaitForChild("AlignPosition").Attachment1 = atch1
  22.     hum:WaitForChild("AlignOrientation").Attachment1 = atch1
  23.    
  24.     while eqAcer.Value == AN do
  25.         atch1.WorldPosition = char.HumanoidRootPart.Position - Vector3.new(3,2.5,0)
  26.         atch1.WorldOrientation = char.HumanoidRootPart.Orientation
  27.        
  28.         wait()
  29.     end
  30. end
  31.  
  32. if eqAcer.Value == "Aquarius" then
  33.     local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Aquarius")
  34.     local AN ="Aquarius"       
  35.            
  36.     AcerFollows(Acer, AN)
  37.    
  38. elseif eqAcer.Value == "Rem" then
  39.     local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Rem")
  40.     local AN = "Rem"
  41.    
  42.     AcerFollows(Acer, AN)
  43.    
  44. elseif eqAcer.Value == "Pokei" then
  45.     local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Pokei")
  46.     local AN = "Pokei"
  47.  
  48.     AcerFollows(Acer, AN)  
  49.    
  50. elseif eqAcer.Value == "Thumpster" then
  51.     local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Thumpster")
  52.     local AN = "Thumpster"
  53.  
  54.     AcerFollows(Acer, AN)
  55.    
  56.    
  57. elseif eqAcer.Value == "Drillbo" then
  58.     local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Drillbo")
  59.     local AN = "Drillbo"
  60.  
  61.     AcerFollows(Acer, AN)
  62.    
  63. elseif eqAcer.Value == "Stario" then
  64.     local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Stario")
  65.     local AN = "Stario"
  66.  
  67.     AcerFollows(Acer, AN)
  68.    
  69. elseif eqAcer.Value == "Norath" then
  70.     local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Norath")
  71.     local AN = "Norath"
  72.  
  73.     AcerFollows(Acer, AN)
  74.    
  75. elseif eqAcer.Value == "ChillyPizza" then
  76.     local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("ChillyPizza")
  77.     local AN = "ChillyPizza"
  78.  
  79.     AcerFollows(Acer, AN)
  80.    
  81. end
  82.  
  83. eqAcer:GetPropertyChangedSignal("Value"):Connect(function()
  84.     char:WaitForChild("Acer"):Destroy()
  85.    
  86.     if eqAcer.Value == "Aquarius" then
  87.         local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Aquarius")
  88.         local AN ="Aquarius"       
  89.  
  90.         AcerFollows(Acer, AN)
  91.  
  92.     elseif eqAcer.Value == "Rem" then
  93.         local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Rem")
  94.         local AN = "Rem"
  95.  
  96.         AcerFollows(Acer, AN)
  97.  
  98.     elseif eqAcer.Value == "Pokei" then
  99.         local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Pokei")
  100.         local AN = "Pokei"
  101.  
  102.         AcerFollows(Acer, AN)  
  103.  
  104.     elseif eqAcer.Value == "Thumpster" then
  105.         local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Thumpster")
  106.         local AN = "Thumpster"
  107.  
  108.         AcerFollows(Acer, AN)
  109.  
  110.  
  111.     elseif eqAcer.Value == "Drillbo" then
  112.         local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Drillbo")
  113.         local AN = "Drillbo"
  114.  
  115.         AcerFollows(Acer, AN)
  116.  
  117.     elseif eqAcer.Value == "Stario" then
  118.         local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Stario")
  119.         local AN = "Stario"
  120.  
  121.         AcerFollows(Acer, AN)
  122.  
  123.     elseif eqAcer.Value == "Norath" then
  124.         local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("Norath")
  125.         local AN = "Norath"
  126.  
  127.         AcerFollows(Acer, AN)
  128.  
  129.     elseif eqAcer.Value == "ChillyPizza" then
  130.         local Acer = game:GetService("ReplicatedStorage"):WaitForChild("Acers"):WaitForChild("ChillyPizza")
  131.         local AN = "ChillyPizza"
  132.  
  133.         AcerFollows(Acer, AN)
  134.  
  135.     end
  136. end)
  137.  
  138. char:WaitForChild("Humanoid").Died:Connect(function()
  139.     char.Acer:Destroy()
  140. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement