Advertisement
random1754

AWOO Script (A Wolf Or Other) [1.1] (Fixing...)

Dec 1st, 2024 (edited)
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.51 KB | Source Code | 0 0
  1. --[[
  2. For now, this script will not work temporarily because RS for some reason
  3. it is assigned as Players and not as ReplicatedStorage :(
  4.  
  5. function GetService(Service)
  6.     local Success, Result = pcall(function()
  7.         return cloneref(game:GetService(Service))
  8.     end)
  9.    
  10.     if not Success then
  11.         warn(Result)
  12.     end
  13.     return Result
  14. end
  15. GetService = newcclosure(GetService)
  16.  
  17. local Players = GetService("Players")
  18. local LPlayer = Players.LocalPlayer
  19. local Character = LPlayer.Character or LPlayer.CharacterAdded:Wait()
  20. local RS = GetService("ReplicatedStorage")
  21. local Wolves = RS:WaitForChild("Wolves")
  22. local Hunters = RS:WaitForChild("Hunters")
  23. local EffectsBin = cloneref(workspace):WaitForChild("EffectsBin")
  24.  
  25. LPlayer.CharacterAdded:Connect(function()
  26.     Character = LPlayer.Character or LPlayer.CharacterAdded:Wait()
  27. end)
  28.  
  29. function GetPlayer(Player)
  30.     local Success, Result = pcall(function()
  31.         return Players:FindFirstChild(Player)
  32.     end)
  33.    
  34.     if not Success then
  35.         warn(Result)
  36.     end
  37.     return Result
  38. end
  39. GetPlayer = newcclosure(GetPlayer)
  40.  
  41. function GetPlayerNameFromGroup(Group)
  42.     local PlayerInt = Group:FindFirstChildOfClass("IntValue")
  43.     if PlayerInt then
  44.         local Player = GetPlayer(PlayerInt.Name)
  45.         if Player and Player.Character then
  46.             return Player.Character.Name
  47.         end
  48.     end
  49. end
  50. GetPlayerNameFromGroup = newcclosure(GetPlayerNameFromGroup)
  51.  
  52. getgenv().GetWolf = newcclosure(function()
  53.     return GetPlayerNameFromGroup(Wolves)
  54. end)
  55.  
  56. getgenv().GetHunter = newcclosure(function()
  57.     return GetPlayerNameFromGroup(Hunters)
  58. end)
  59.  
  60. function TP(Object, Parent)
  61.     task.spawn(function()
  62.         local Success, Result = pcall(function()
  63.             if not Character then
  64.                 repeat
  65.                     task.wait()
  66.                 until Character
  67.                
  68.                 if not Character:FindFirstChild("HumanoidRootPart") then
  69.                     repeat
  70.                         task.wait()
  71.                     until Character:FindFirstChild("HumanoidRootPart")
  72.                 end
  73.             end
  74.            
  75.             local Old = Character.HumanoidRootPart.CFrame
  76.             repeat
  77.                 Character.HumanoidRootPart.CFrame = Object.CFrame
  78.                 task.wait(0.15)
  79.             until Object.Parent ~= Parent
  80.             Character.HumanoidRootPart.CFrame = Old
  81.         end)
  82.        
  83.         if not Success then
  84.             warn(Result)
  85.         end
  86.     end)
  87. end
  88. TP = newcclosure(TP)
  89.  
  90. function IsGuilt(Player)
  91.     local Success, Result = pcall(function()
  92.         for _, v in pairs(Player.Character:GetChildren()) do
  93.             if v:IsA("IntValue") and v.Name == "Guilt" and v.Value == 1 then
  94.                 return true
  95.             end
  96.         end
  97.         return false
  98.     end)
  99.        
  100.     if not Success then
  101.         warn(Result)
  102.     end
  103.     return Result
  104. end
  105. IsGuilt = newcclosure(IsGuilt)
  106.  
  107. EffectsBin.ChildAdded:Connect(function(v)
  108.     task.spawn(function()
  109.         local Success, Result = pcall(function()
  110.             if v:IsA("BasePart") and v.Name == "CollectableItem" and not IsGuilt(LPlayer) then
  111.                 TP(v, EffectsBin)
  112.             elseif v.Name == "Handle" then
  113.                 if Character and Character.Name ~= GetWolf() and not IsGuilt(LPlayer) then
  114.                     TP(v, EffectsBin)
  115.                 end
  116.             end
  117.         end)
  118.        
  119.         if not Success then
  120.             warn(Result)
  121.         end
  122.     end)
  123. end)
  124. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement