Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- For now, this script will not work temporarily because RS for some reason
- it is assigned as Players and not as ReplicatedStorage :(
- function GetService(Service)
- local Success, Result = pcall(function()
- return cloneref(game:GetService(Service))
- end)
- if not Success then
- warn(Result)
- end
- return Result
- end
- GetService = newcclosure(GetService)
- local Players = GetService("Players")
- local LPlayer = Players.LocalPlayer
- local Character = LPlayer.Character or LPlayer.CharacterAdded:Wait()
- local RS = GetService("ReplicatedStorage")
- local Wolves = RS:WaitForChild("Wolves")
- local Hunters = RS:WaitForChild("Hunters")
- local EffectsBin = cloneref(workspace):WaitForChild("EffectsBin")
- LPlayer.CharacterAdded:Connect(function()
- Character = LPlayer.Character or LPlayer.CharacterAdded:Wait()
- end)
- function GetPlayer(Player)
- local Success, Result = pcall(function()
- return Players:FindFirstChild(Player)
- end)
- if not Success then
- warn(Result)
- end
- return Result
- end
- GetPlayer = newcclosure(GetPlayer)
- function GetPlayerNameFromGroup(Group)
- local PlayerInt = Group:FindFirstChildOfClass("IntValue")
- if PlayerInt then
- local Player = GetPlayer(PlayerInt.Name)
- if Player and Player.Character then
- return Player.Character.Name
- end
- end
- end
- GetPlayerNameFromGroup = newcclosure(GetPlayerNameFromGroup)
- getgenv().GetWolf = newcclosure(function()
- return GetPlayerNameFromGroup(Wolves)
- end)
- getgenv().GetHunter = newcclosure(function()
- return GetPlayerNameFromGroup(Hunters)
- end)
- function TP(Object, Parent)
- task.spawn(function()
- local Success, Result = pcall(function()
- if not Character then
- repeat
- task.wait()
- until Character
- if not Character:FindFirstChild("HumanoidRootPart") then
- repeat
- task.wait()
- until Character:FindFirstChild("HumanoidRootPart")
- end
- end
- local Old = Character.HumanoidRootPart.CFrame
- repeat
- Character.HumanoidRootPart.CFrame = Object.CFrame
- task.wait(0.15)
- until Object.Parent ~= Parent
- Character.HumanoidRootPart.CFrame = Old
- end)
- if not Success then
- warn(Result)
- end
- end)
- end
- TP = newcclosure(TP)
- function IsGuilt(Player)
- local Success, Result = pcall(function()
- for _, v in pairs(Player.Character:GetChildren()) do
- if v:IsA("IntValue") and v.Name == "Guilt" and v.Value == 1 then
- return true
- end
- end
- return false
- end)
- if not Success then
- warn(Result)
- end
- return Result
- end
- IsGuilt = newcclosure(IsGuilt)
- EffectsBin.ChildAdded:Connect(function(v)
- task.spawn(function()
- local Success, Result = pcall(function()
- if v:IsA("BasePart") and v.Name == "CollectableItem" and not IsGuilt(LPlayer) then
- TP(v, EffectsBin)
- elseif v.Name == "Handle" then
- if Character and Character.Name ~= GetWolf() and not IsGuilt(LPlayer) then
- TP(v, EffectsBin)
- end
- end
- end)
- if not Success then
- warn(Result)
- end
- end)
- end)
- ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement