Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Rufus14
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Part3 = Instance.new("Part")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Part5 = Instance.new("Part")
- SpecialMesh6 = Instance.new("SpecialMesh")
- Weld7 = Instance.new("Weld")
- Weld8 = Instance.new("Weld")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- PointLight11 = Instance.new("PointLight")
- Script12 = Instance.new("Script")
- Tool0.Name = "Phial of Galadriel"
- Tool0.Parent = mas
- Part1.Name = "b"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(14.9249907, 0.900027037, 21.7563553, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part1.Orientation = Vector3.new(0, 90, 0)
- Part1.Position = Vector3.new(14.9249907, 0.900027037, 21.7563553)
- Part1.Rotation = Vector3.new(0, 90, 0)
- Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part1.Size = Vector3.new(1.64770472, 0.250737697, 0.250737697)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Institutional white")
- Part1.Material = Enum.Material.Neon
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Institutional white")
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshType = Enum.MeshType.Cylinder
- Part3.Name = "a"
- Part3.Parent = Tool0
- Part3.CFrame = CFrame.new(14.9249907, 0.900026977, 21.1116028, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part3.Orientation = Vector3.new(0, 90, 0)
- Part3.Position = Vector3.new(14.9249907, 0.900026977, 21.1116028)
- Part3.Rotation = Vector3.new(0, 90, 0)
- Part3.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part3.Size = Vector3.new(0.21491766, 0.322377056, 0.322377056)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Institutional white")
- Part3.Material = Enum.Material.Neon
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.brickColor = BrickColor.new("Institutional white")
- SpecialMesh4.Parent = Part3
- SpecialMesh4.MeshType = Enum.MeshType.Cylinder
- Part5.Name = "Handle"
- Part5.Parent = Tool0
- Part5.CFrame = CFrame.new(14.9249945, 0.875027001, 22.4011116, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part5.Orientation = Vector3.new(0, 90, 0)
- Part5.Position = Vector3.new(14.9249945, 0.875027001, 22.4011116)
- Part5.Rotation = Vector3.new(0, 90, 0)
- Part5.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part5.Size = Vector3.new(1.43278694, 0.866393507, 0.816393495)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.BrickColor = BrickColor.new("Institutional white")
- Part5.Material = Enum.Material.Neon
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.brickColor = BrickColor.new("Institutional white")
- SpecialMesh6.Parent = Part5
- SpecialMesh6.MeshType = Enum.MeshType.Sphere
- Weld7.Parent = Part5
- Weld7.C0 = CFrame.new(1.28950882, 0.0249999762, -3.81469727e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld7.Part0 = Part5
- Weld7.Part1 = Part3
- Weld7.part1 = Part3
- Weld8.Parent = Part5
- Weld8.C0 = CFrame.new(0.644756317, 0.025000006, -3.81469727e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld8.Part0 = Part5
- Weld8.Part1 = Part1
- Weld8.part1 = Part1
- Sound9.Name = "Use"
- Sound9.Parent = Part5
- Sound9.Looped = true
- Sound9.EmitterSize = 50
- Sound9.MinDistance = 50
- Sound9.SoundId = "rbxassetid://596782957"
- Sound9.Volume = 1
- Sound10.Name = "Breaksound"
- Sound10.Parent = Part5
- Sound10.Pitch = 0.80000001192093
- Sound10.PlayOnRemove = true
- Sound10.PlaybackSpeed = 0.80000001192093
- Sound10.SoundId = "rbxassetid://156444949"
- Sound10.Volume = 1
- PointLight11.Parent = Part5
- PointLight11.Range = 15
- PointLight11.Brightness = 1.5
- Script12.Name = "Starlight"
- Script12.Parent = Tool0
- table.insert(cors,sandbox(Script12,function()
- --By Rufus14
- --[[
- What it does:
- -It repels npc's with "Zombie" in their name
- -characters have to be in workspace to make repel function work
- ]]--
- tool = script.Parent
- owner = nil
- handle = tool.Handle
- usesound = handle.Use
- breaksound = handle.Breaksound
- step = game:GetService("RunService").Stepped
- tookon = false
- sine = 0
- usemeter = 1300
- function equipped()
- tookon = true
- if usemeter ~= 0 then
- usesound:Play()
- end
- owner = tool.Parent
- if owner:findFirstChild("Torso") then
- local toolweld = owner["Right Arm"]:WaitForChild("RightGrip")
- toolweld.C0 = toolweld.C0 * CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.6,0,0)
- if owner:findFirstChild("Left Arm") then
- local leftarm = Instance.new("Weld", owner.Torso)
- leftarm.Part0 = owner.Torso
- leftarm.Part1 = owner["Left Arm"]
- leftarm.C0 = CFrame.new(-1.5,0.5,0)
- leftarm.C1 = CFrame.new(0,0.5,0)
- leftarm.Name = "LeftArmWeldd"
- end
- if owner:findFirstChild("Right Arm") then
- local rightarm = Instance.new("Weld", owner.Torso)
- rightarm.Part0 = owner.Torso
- rightarm.Part1 = owner["Right Arm"]
- rightarm.C0 = CFrame.new(1.5,0.5,0)
- rightarm.C1 = CFrame.new(0,0.5,0)
- rightarm.Name = "RightArmWeldd"
- end
- local head = Instance.new("Weld", owner.Torso)
- head.Part0 = owner.Torso
- head.Part1 = owner.Head
- head.C0 = CFrame.new(0,1,0)
- head.C1 = CFrame.new(0,-0.5,0)
- head.Name = "HeadWeldd"
- local function animate()
- while tookon and step:wait() do
- sine = sine - 1
- head.C0 = head.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(math.rad(5)+math.rad(2*math.sin(sine/50)),-math.rad(10)+math.rad(3*math.cos(sine/50)),0),0.15)
- if owner.Torso:findFirstChild("LeftArmWeldd") then
- owner.Torso:findFirstChild("LeftArmWeldd").C0 = owner.Torso:findFirstChild("LeftArmWeldd").C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,math.rad(-10)+math.rad(3*math.cos(sine/50))),0.15)
- end
- if owner.Torso:findFirstChild("RightArmWeldd") then
- owner.Torso:findFirstChild("RightArmWeldd").C0 = owner.Torso:findFirstChild("RightArmWeldd").C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles((math.pi)-math.rad(15)+math.rad(3*math.sin(sine/50)),0,0),0.15)
- end
- end
- end
- spawn(animate)
- while tookon and usemeter ~= 0 do
- usemeter = usemeter - 1
- if usemeter == 0 then
- tool.Parent = workspace
- if handle:findFirstChildOfClass("PointLight") then
- breaksound:Play()
- handle.Transparency = 0.6
- if tool:findFirstChild("a") then
- tool.a.Transparency = 0.6
- end
- if tool:findFirstChild("b") then
- tool.b.Transparency = 0.6
- end
- handle:findFirstChildOfClass("PointLight"):destroy()
- end
- end
- for i,v in pairs(workspace:GetChildren()) do
- if v.ClassName == "Model" and v ~= owner then
- local zombiehumanoid = v:findFirstChildOfClass("Humanoid")
- local zombiehead = v:findFirstChild("Head")
- if zombiehumanoid and zombiehead then
- if (zombiehead.Position - handle.Position).magnitude <= 30 then
- if string.find(string.lower(v.Name),"zombie",1) or string.find(string.lower(v.Name),"demon",1) or string.find(string.lower(v.Name),"satan",1) or string.find(string.lower(v.Name),"skeleton",1) or string.find(string.lower(v.Name),"furry",1) or string.find(string.lower(v.Name),"latex",1) or string.find(string.lower(zombiehumanoid .DisplayName),"latex",1) then
- walkaway(v, zombiehead, zombiehumanoid)
- elseif zombiehumanoid.Name == string.find(string.lower(v.Name),"zombie",1) then --check if humanoid is named zombie
- walkaway(v, zombiehead, zombiehumanoid)
- elseif zombiehead:findFirstChild("c-cat_noises") then --anti grey cat script
- walkaway(v, zombiehead, zombiehumanoid)
- elseif v:findFirstChildOfClass("Sound") then
- if v:findFirstChildOfClass("Sound").SoundId == "rbxassetid://614032233" or v:findFirstChildOfClass("Sound").SoundId == "rbxassetid://415898123" or v:findFirstChildOfClass("Sound").Name == "wrecked" then
- walkaway(v, zombiehead, zombiehumanoid)
- end
- elseif v:findFirstChild("_status") then
- if v["_status"]:findFirstChildOfClass("TextLabel") then
- walkaway(v, zombiehead, zombiehumanoid)
- end
- end
- end
- end
- end
- end
- step:wait()
- end
- end
- end
- function walkaway(zombie, hed, humanoidzombie)
- if not zombie:findFirstChild("okbroimgoing") then
- local okimgoing = Instance.new("BoolValue", zombie)
- okimgoing.Name = "okbroimgoing"
- local function makeapath()
- local function pathspawn()
- local randompart = Instance.new("Part", workspace)
- randompart.CFrame = CFrame.new(hed.Position, handle.Position)
- randompart.Anchored = true
- randompart.CanCollide = false
- randompart.Transparency = 1
- randompart.CFrame = randompart.CFrame * CFrame.new(math.random(-30,30),math.random(-30,30),math.random(10,30))
- humanoidzombie.WalkToPoint = randompart.Position
- local path = game:GetService("PathfindingService"):FindPathAsync(hed.Position, randompart.Position)
- local points = path:GetWaypoints()
- randompart:destroy()
- local threshold = 0
- if path.Status == Enum.PathStatus.Success then
- local chance = 2
- humanoidzombie.WalkSpeed = 30
- local function run()
- wait(0.5)
- humanoidzombie.WalkSpeed = 16
- end
- spawn(run)
- for q,w in pairs(points) do
- threshold = 0
- while (hed.Position - w.Position).magnitude >= 5.5 and threshold <= 39 and chance ~= 0 do
- humanoidzombie.WalkToPoint = w.Position
- threshold = threshold + 1
- if threshold >= 40 then
- chance = chance - 1
- break
- end
- if w.Action == Enum.PathWaypointAction.Jump then
- humanoidzombie.Jump = true
- end
- step:wait()
- end
- end
- okimgoing:destroy()
- else
- makeapath()
- end
- end
- spawn(pathspawn)
- end
- makeapath()
- end
- end
- function unequipped()
- tookon = false
- usesound:Stop()
- if owner:findFirstChild("Torso") then
- for i = 0,1 , 0.04 do
- if owner.Torso:findFirstChild("HeadWeldd") then
- owner.Torso:findFirstChild("HeadWeldd").C0 = owner.Torso:findFirstChild("HeadWeldd").C0:lerp(CFrame.new(0,1,0),0.15)
- end
- if owner.Torso:findFirstChild("LeftArmWeldd") then
- owner.Torso:findFirstChild("LeftArmWeldd").C0 = owner.Torso:findFirstChild("LeftArmWeldd").C0:lerp(CFrame.new(-1.5,0.5,0),0.15)
- end
- if owner.Torso:findFirstChild("RightArmWeldd") then
- owner.Torso:findFirstChild("RightArmWeldd").C0 = owner.Torso:findFirstChild("RightArmWeldd").C0:lerp(CFrame.new(1.5,0.5,0),0.15)
- end
- step:wait()
- end
- if owner.Torso:findFirstChild("RightArmWeldd") then
- owner.Torso:findFirstChild("RightArmWeldd"):destroy()
- end
- if owner.Torso:findFirstChild("LeftArmWeldd") then
- owner.Torso:findFirstChild("LeftArmWeldd"):destroy()
- end
- if owner.Torso:findFirstChild("HeadWeldd") then
- owner.Torso:findFirstChild("HeadWeldd"):destroy()
- end
- end
- end
- tool.Equipped:connect(equipped)
- tool.Unequipped:connect(unequipped)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner.Character
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Add Comment
Please, Sign In to add comment