Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = Instance.new("Tool", game.Players.LocalPlayer.Backpack)
- tool.RequiresHandle = false
- tool.Name = "Raid"
- tool.CanBeDropped = false
- local pos1 = nil
- local pos2 = nil
- local bridgesize = 10
- local mouse = game.Players.LocalPlayer:GetMouse()
- local isEquipped = false
- local isSettingPos = false
- local bridgeEnabled = false
- local dist = 0
- function asdf(origin, target, properties)
- game.Workspace.resources.RemoteEvent:FireServer("FireAllClients","drawLaser", origin, target, properties)
- end
- mouse.KeyDown:Connect(function(k)
- if not isEquipped then return end
- key = k:lower()
- if key == "e" then
- if bridgesize <= 5 then return end
- bridgesize = bridgesize - 1
- end
- if key == "r" then
- if bridgesize >= 25 then return end
- bridgesize = bridgesize + 1
- end
- if key == "t" then
- bridgeEnabled = false
- isSettingPos = false
- pos1 = nil
- pos2 = nil
- bridgesize = 50
- end
- end)
- tool.Equipped:Connect(function()
- isEquipped = true
- end)
- tool.Unequipped:Connect(function()
- isEquipped = false
- end)
- tool.Activated:Connect(function()
- if not isSettingPos then
- pos1 = mouse.hit
- isSettingPos = true
- else
- pos2 = mouse.hit
- isSettingPos = false
- bridgeEnabled = true
- dist = (pos1.p-pos2.p).magnitude
- end
- end)
- while wait(.1) do
- if bridgeEnabled then
- asdf(pos1.p, pos2.p, {
- ["CanCollide"] = true,
- ["Size"] = Vector3.new( 40440, 20044, 40023),
- ["Material"] = "Neon",
- ["Shape"] = "Block",
- ["Transparency"] = 1,
- ["Color"] = Color3.new(392,329,324),
- ["CFrame"] = CFrame.new(pos1.p, pos2.p) * CFrame.new(0,0, -dist/2) * CFrame.Angles(0,0,0),
- })
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement