Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- e = Instance.new("RemoteEvent",owner.Character)
- e.Name = "The"
- t = 1
- local blacklist = {}
- coroutine.wrap(function()
- while wait() do
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- v.Chatted:Connect(function(msg)
- if msg == "-blacklist" and not table.find(blacklist,v.Character) then
- table.insert(blacklist,v.Character)
- elseif msg == "-whitelist" and table.find(blacklist,v.Character) then
- table.remove(blacklist,table.find(blacklist,v.Character))
- end
- end)
- end
- end
- end)()
- e.OnServerEvent:Connect(function(_,hit)
- local g = Vector3.new(0, -game.Workspace.Gravity, 0);
- local x0 = owner.Character.HumanoidRootPart.CFrame * Vector3.new(0, 2, -2)
- local v0 = (hit - x0 - 0.5*g*t*t)/t;
- local c = Instance.new("Part");
- c.CanCollide = true;
- c.Size = Vector3.new(15,15,15)
- c.CFrame = CFrame.new(x0)
- c.Velocity = v0
- c.Material = "Glass"
- c.Color = Color3.fromRGB(80,10,10)
- c.Transparency = 0.35
- local density = 1000000000000000000
- local friction = 1
- local elasticity = 0.5
- local frictionWeight = 10000
- local elasticityWeight = 10000
- local physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight)
- c.CustomPhysicalProperties = physProperties
- c.Parent = script
- Instance.new("BodyGyro",c).MaxTorque = Vector3.new(500000000000,0,500000000000)
- local function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- local torso = nil
- local dist = 1000000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- coroutine.wrap(function()
- temp2 = list[x]
- if (temp2.className == "Model") then
- temp = temp2:findFirstChild("Head")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) and not table.find(blacklist,temp2) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end)()
- end
- return torso
- end
- waiting = false
- wait(0.5)
- c.Touched:Wait()
- coroutine.wrap(function()
- while true do
- task.wait()
- local torso = findNearestTorso(c.Position)
- if torso~=nil then
- local g = Vector3.new(0, -game.Workspace.Gravity, 0);
- local x0 = c.CFrame * Vector3.new(0, 0, 0)
- local v0 = (torso.Position - x0 - 0.5*g*t*t)/t
- c.Velocity = v0
- local TweenService = game:GetService("TweenService")
- local goal = {}
- goal.Size = Vector3.new(c.Size.X * 0.75,c.Size.Y * 1.5,c.Size.Z * 0.75)
- local tweenInfo = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, true,0)
- local tween = TweenService:Create(c, tweenInfo, goal)
- tween:Play()
- wait(0.5)
- waiting = true
- c.Touched:Wait()
- local TweenService = game:GetService("TweenService")
- local goal = {}
- goal.Size = Vector3.new(c.Size.X * 0.75,c.Size.Y * 1.5,c.Size.Z * 0.75)
- local tweenInfo = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, true,0)
- local tween = TweenService:Create(c, tweenInfo, goal)
- tween:Play()
- wait(5)
- end
- end
- end)()
- end)
- NLS([[
- e = owner.Character:WaitForChild("The")
- mouse = owner:GetMouse()
- owner:GetMouse().Button1Down:Connect(function()
- e:FireServer(mouse.Hit.p)
- end)
- ]],owner.PlayerGui)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement