Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local btool = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
- local SelectionBox = Instance.new("SelectionBox",game.Workspace)
- SelectionBox.Name = "HeliSelection"
- SelectionBox.LineThickness = 0.05
- SelectionBox.Adornee = nil
- SelectionBox.Color3 = Color3.fromRGB(0,0,255)
- SelectionBox.Visible = false
- btool.Name = "Helicopter Kill"
- btool.RequiresHandle = false
- local IsEquipped = false
- local Mouse = game.Players.LocalPlayer:GetMouse()
- btool.Equipped:connect(function()
- IsEquipped = true
- SelectionBox.Visible = true
- SelectionBox.Adornee = nil
- end)
- btool.Unequipped:connect(function()
- IsEquipped = false
- SelectionBox.Visible = false
- SelectionBox.Adornee = nil
- end)
- btool.Activated:connect(function()
- if IsEquipped then
- local _instance = mouse.Target
- while _instance.Name ~= "helicopter" do
- if _instance.Name == "Workspace" then
- return
- end
- _instance = _instance.Parent
- end
- workspace.resources.RemoteEvent:FireServer("dealDamage", _instance.damageControl.Humanoid, 1000)
- end
- end)
- while true do
- SelectionBox.Adornee = Mouse.Target or nil
- wait(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement