Advertisement
Script_Master132

Untitled

Apr 25th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. local tool = Instance.new("Tool", game.Players.LocalPlayer.Backpack)
  2. tool.RequiresHandle = false
  3. tool.Name = "Raid"
  4. tool.CanBeDropped = false
  5.  
  6.  
  7.  
  8.  
  9. local pos1 = nil
  10. local pos2 = nil
  11. local bridgesize = 10
  12. local mouse = game.Players.LocalPlayer:GetMouse()
  13. local isEquipped = false
  14. local isSettingPos = false
  15. local bridgeEnabled = false
  16. local dist = 0
  17.  
  18. function asdf(origin, target, properties)
  19. game.Workspace.resources.RemoteEvent:FireServer("FireAllClients","drawLaser", origin, target, properties)
  20. end
  21.  
  22. mouse.KeyDown:Connect(function(k)
  23. if not isEquipped then return end
  24. key = k:lower()
  25. if key == "e" then
  26. if bridgesize <= 5 then return end
  27. bridgesize = bridgesize - 1
  28.  
  29. end
  30. if key == "r" then
  31. if bridgesize >= 25 then return end
  32. bridgesize = bridgesize + 1
  33.  
  34.  
  35. end
  36. if key == "t" then
  37. bridgeEnabled = false
  38. isSettingPos = false
  39. pos1 = nil
  40. pos2 = nil
  41. bridgesize = 50
  42.  
  43. end
  44. end)
  45.  
  46.  
  47. tool.Equipped:Connect(function()
  48. isEquipped = true
  49. end)
  50.  
  51. tool.Unequipped:Connect(function()
  52. isEquipped = false
  53. end)
  54.  
  55.  
  56.  
  57. tool.Activated:Connect(function()
  58. if not isSettingPos then
  59. pos1 = mouse.hit
  60.  
  61. isSettingPos = true
  62. else
  63. pos2 = mouse.hit
  64.  
  65. isSettingPos = false
  66. bridgeEnabled = true
  67. dist = (pos1.p-pos2.p).magnitude
  68. end
  69. end)
  70.  
  71. while wait(.1) do
  72. if bridgeEnabled then
  73. asdf(pos1.p, pos2.p, {
  74. ["CanCollide"] = true,
  75. ["Size"] = Vector3.new( 40440, 20044, 40023),
  76. ["Material"] = "Neon",
  77. ["Shape"] = "Block",
  78. ["Transparency"] = 1,
  79. ["Color"] = Color3.new(392,329,324),
  80. ["CFrame"] = CFrame.new(pos1.p, pos2.p) * CFrame.new(0,0, -dist/2) * CFrame.Angles(0,0,0),
  81. })
  82. end
  83. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement