Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This code was written by Squeezemeister.
- local function FindHittablePlayers()
- for i, Player in pairs(game.Players:GetChildren()) do
- if Player.Character ~= nil and Player.Character:FindFirstChild("Torso") and (Player.Character.Torso.Position - Model.Torso.Position).Magnitude <= 15 then
- return true
- end
- end
- end
- coroutine.wrap(function()
- while Model:FindFirstChild("SLP") do
- task.wait(5)
- local found = FindHittablePlayers() -- don't make a table OR ELSE! (that's why its false)
- if found then
- local warning = game.ServerStorage.Items["ANGRY!"]:Clone()
- warning.CanCollide, warning.Anchored, warning.Massless, warning.CFrame =
- false, false, true, Model.Torso.CFrame*CFrame.new(-0.5, -0.5, 1)*CFrame.Angles(0, 0, math.rad(15))
- local weld = Instance.new("Weld")
- weld.Part0, weld.Part1, weld.C0 = warning, Model.Torso, CFrame.new(-0.5, -0.5, 1)
- weld.Parent = warning
- warning.Parent = workspace
- task.wait(0.5) -- warning time
- warning:Destroy()
- local inner = Instance.new("Part")
- inner.CanCollide, inner.Massless, inner.CFrame = false, true, Model.Torso.CFrame
- inner.Material = "Neon"
- inner.BrickColor = BrickColor.new("Really black")
- inner.Size = Vector3.new(5, 5, 5)
- inner.Transparency = 0.5
- local outer = Instance.new("Part")
- outer.CanCollide, outer.Massless, outer.CFrame = false, true, Model.Torso.CFrame
- outer.Material = "Neon"
- outer.BrickColor = BrickColor.new("Dark indigo")
- outer.Size = Vector3.new(9, 9, 9)
- outer.Transparency = 0.8
- local light = Instance.new("PointLight")
- light.Enabled, light.Shadows = true, false
- light.Brightness, light.Range = 5, 10
- light.Color = Color3.new(0, 0, 0.498039)
- weld = Instance.new("Weld")
- weld.Part0, weld.Part1 = inner, Model.Torso
- weld.Parent = inner
- weld = Instance.new("Weld")
- weld.Part0, weld.Part1 = outer, Model.Torso
- weld.Parent = outer
- game:GetService("Debris"):AddItem(inner, 2)
- game:GetService("Debris"):AddItem(outer, 2)
- light.Parent = outer
- inner.Parent, outer.Parent = workspace, workspace
- for i, Player in pairs(game.Players:GetChildren()) do
- if Player.Character ~= nil and Player.Character:FindFirstChild("Torso") and (Player.Character.Torso.Position - Model.Torso.Position).Magnitude <= 15 then
- DamageMod:RegisterDamage(Model, Player, CLOSEDAMAGE)
- -- Below is the code for pushing.
- --[[
- local bv = Instance.new("BodyVelocity")
- bv.MaxForce, bv.Velocity = Vector3.new(math.huge, math.huge, math.huge), Model.Torso.CFrame.LookVector * 50
- game:GetService("Debris"):AddItem(bv, 0.5)
- bv.Parent = Player.Character.Torso
- ]]
- end
- end
- end
- end
- end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement