MehWotever

TeleKenisis

Jun 23rd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.96 KB | None | 0 0
  1. --[[
  2.  
  3. _______ _ _ _ _
  4. |__ __| | | | | (_) (_)
  5. | | ___| | ___| | ___ _ __ ___ ___ _ ___
  6. | |/ _ \ |/ _ \ |/ / | '_ \ / _ \/ __| / __|
  7. | | __/ | __/ <| | | | | __/\__ \ \__ \
  8. |_|\___|_|\___|_|\_\_|_| |_|\___||___/_|___/
  9.  
  10. Made By: astrologicality.
  11. Edited By: Rocky2u.
  12.  
  13. Keys:
  14. Left Mouse Click: Telekinesis.
  15. E: Spawn Brick At Cursor Location.
  16. F: Toggle Telekinesis Visibility.
  17. G: Blow Selected Object.
  18. H: UnAnchored Selected Object.
  19. V: 100 Studs Away The Selected Object.
  20. C: 5 Studs Away The Selected Object.
  21. X: +5 Studs Away The Selected Object.
  22. Z: -5 Studs Away The Selected Object.
  23.  
  24. --]]
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. local Players = game.Players
  47.  
  48. local Player = Players.LocalPlayer
  49.  
  50. local Mouse = Player:GetMouse()
  51.  
  52. local dist = 25
  53.  
  54. local trans = 1
  55.  
  56. local dwn=false
  57.  
  58. if Player.Backpack:FindFirstChild("Telekinesis") ~= nil then
  59. Player.Backpack.Telekinesis:Destroy()
  60. end
  61.  
  62. local Bin = Instance.new("HopperBin")
  63.  
  64. Bin.Name = "Telekinesis"
  65.  
  66. Bin.Parent = Player.Backpack
  67.  
  68. BoxColor = "White"
  69.  
  70.  
  71. local ScreenGUI = Instance.new("ScreenGui", Player.PlayerGui)
  72.  
  73. local Color = Instance.new("Color3Value", ScreenGUI)
  74.  
  75. local ColorValue = Color.Value
  76.  
  77. local Blue = Instance.new("TextButton", ScreenGUI)
  78.  
  79. local Red = Instance.new("TextButton", ScreenGUI)
  80.  
  81. local Green = Instance.new("TextButton", ScreenGUI)
  82.  
  83. local Yellow = Instance.new("TextButton", ScreenGUI)
  84.  
  85. local Pink = Instance.new("TextButton", ScreenGUI)
  86.  
  87. local LightBlue = Instance.new("TextButton", ScreenGUI)
  88.  
  89. local White = Instance.new("TextButton", ScreenGUI)
  90.  
  91. Color.Name = "Color"
  92.  
  93. Blue.BackgroundColor3 = BrickColor.new("Bright blue").Color
  94.  
  95. Blue.Transparency = 0.5
  96.  
  97. Blue.Size = UDim2.new(0, 20 ,0, 20)
  98.  
  99. Blue.Position = UDim2.new(1, -35, 1, -35)
  100.  
  101. Blue.Name = "Blue"
  102.  
  103. Blue.Text = ""
  104.  
  105. Blue.Visible = false
  106.  
  107. Red.BackgroundColor3 = BrickColor.new("Bright red").Color
  108.  
  109. Red.Transparency = 0.5
  110.  
  111. Red.Size = UDim2.new(0, 20 ,0, 20)
  112.  
  113. Red.Position = UDim2.new(1,-65, 1, -35)
  114.  
  115. Red.Name = "Red"
  116.  
  117. Red.Text = ""
  118.  
  119. Red.Visible = false
  120.  
  121. Green.BackgroundColor3 = BrickColor.new("Bright green").Color
  122.  
  123. Green.Transparency = 0.5
  124.  
  125. Green.Size = UDim2.new(0, 20 ,0, 20)
  126.  
  127. Green.Position = UDim2.new(1,-95, 1, -35)
  128.  
  129. Green.Name = "Green"
  130.  
  131. Green.Text = ""
  132.  
  133. Green.Visible = false
  134.  
  135. Yellow.BackgroundColor3 = BrickColor.new("New Yeller").Color
  136.  
  137. Yellow.Transparency = 0.5
  138.  
  139. Yellow.Size = UDim2.new(0, 20 ,0, 20)
  140.  
  141. Yellow.Position = UDim2.new(1,-125, 1, -35)
  142.  
  143. Yellow.Name = "Yellow"
  144.  
  145. Yellow.Text = ""
  146.  
  147. Yellow.Visible = false
  148.  
  149. Pink.BackgroundColor3 = BrickColor.new("Hot pink").Color
  150.  
  151. Pink.Transparency = 0.5
  152.  
  153. Pink.Size = UDim2.new(0, 20 ,0, 20)
  154.  
  155. Pink.Position = UDim2.new(1,-155, 1, -35)
  156.  
  157. Pink.Name = "Pink"
  158.  
  159. Pink.Text = ""
  160.  
  161. Pink.Visible = false
  162.  
  163. LightBlue.BackgroundColor3 = BrickColor.new("Cyan").Color
  164.  
  165. LightBlue.Transparency = 0.5
  166.  
  167. LightBlue.Size = UDim2.new(0, 20 ,0, 20)
  168.  
  169. LightBlue.Position = UDim2.new(1,-185, 1, -35)
  170.  
  171. LightBlue.Name = "LightBlue"
  172.  
  173. LightBlue.Text = ""
  174.  
  175. LightBlue.Visible = false
  176.  
  177. White.BackgroundColor3 = BrickColor.new("White").Color
  178.  
  179. White.Transparency = 0.5
  180.  
  181. White.Size = UDim2.new(0, 20 ,0, 20)
  182.  
  183. White.Position = UDim2.new(1,-215, 1, -35)
  184.  
  185. White.Name = "White"
  186.  
  187. White.Text = ""
  188.  
  189. White.Visible = false
  190.  
  191. if game.Lighting:FindFirstChild("TelekinesisGrab") ~= nil then
  192. game.Lighting.TelekinesisGrab:Destroy()
  193. end
  194.  
  195. local bawl = Instance.new("Part", game.Lighting)
  196.  
  197. bawl.Name="TelekinesisGrab"
  198.  
  199. local bp = Instance.new("BodyPosition", bawl)
  200.  
  201. local w = Instance.new("Weld", bawl)
  202.  
  203. function onButton1Down(mouse)
  204.  
  205. bawl.Size = Vector3.new(2,2,2)
  206.  
  207. bawl.Material = "Neon"
  208.  
  209. bawl.Shape = 0
  210.  
  211. bawl.Transparency=trans
  212.  
  213. bawl.Name="TelekinesisGrab"
  214.  
  215. bawl.CanCollide = false
  216.  
  217. bawl.Parent = game.Workspace
  218.  
  219. w.Parent = bawl
  220.  
  221. w.Name = "Weld"
  222.  
  223. bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  224.  
  225. bp.Parent = bawl
  226.  
  227. bp.Name="lolx"
  228.  
  229. bawl.Parent = workspace
  230.  
  231. if mouse ~= nil then
  232.  
  233. if mouse.Target ~= nil then
  234.  
  235. w.Part0 = mouse.Target
  236.  
  237. w.Part1 = bawl
  238.  
  239. dwn = true
  240.  
  241. if mouse.Target.Parent:FindFirstChild("Humanoid") then
  242.  
  243. mouse.Target.Parent:FindFirstChild("Humanoid").PlatformStand=true
  244.  
  245. else
  246.  
  247. print('no humanoid')
  248.  
  249. end
  250.  
  251. end
  252.  
  253. end
  254.  
  255. spawn(function()
  256.  
  257. while dwn == true do
  258.  
  259. ypcall(function()
  260.  
  261. bp.Parent = bawl
  262.  
  263. bp.position = Player.Character.Torso.Position + (mouse.Hit.lookVector*dist)
  264.  
  265. wait()
  266.  
  267. end)
  268.  
  269. end
  270.  
  271. end)
  272.  
  273. end
  274.  
  275. function onButton1Up(mouse)
  276.  
  277. dwn=false
  278.  
  279. if bawl ~= nil then
  280.  
  281. bawl.Parent=game.Lighting
  282.  
  283. else
  284.  
  285. print('not found')
  286.  
  287. end
  288.  
  289. end
  290.  
  291. function onKeyDown(key, mouse)
  292.  
  293. key:lower()
  294.  
  295. if key == "r" then
  296.  
  297. if bawl ~= nil then
  298.  
  299. --bawl.Parent=nil
  300.  
  301. end
  302.  
  303. elseif key == "e" then
  304.  
  305. local p = Instance.new("Part", workspace)
  306.  
  307. p.Size = Vector3.new(3,3,3)
  308.  
  309. p.Material = "Neon"
  310.  
  311. p.Position = mouse.Hit.p + Vector3.new(0,2,0)
  312.  
  313. p.BrickColor = bawl.BrickColor
  314.  
  315. p.Shape = "Ball"
  316.  
  317. p.BottomSurface = "Smooth"
  318.  
  319. p.TopSurface = "Smooth"
  320.  
  321. elseif key == "h" then
  322.  
  323. if bawl ~= nil then
  324.  
  325. if bawl:FindFirstChild("Weld") ~= nil then
  326.  
  327. if bawl:FindFirstChild("Weld").Part0 ~= nil then
  328.  
  329. bawl:FindFirstChild("Weld").Part0.Anchored=false
  330.  
  331. end
  332.  
  333. end
  334.  
  335. end
  336.  
  337. elseif key == "g" then
  338.  
  339. if bawl ~= nil then
  340.  
  341. local x = Instance.new("Explosion",workspace)
  342.  
  343. x.Position=bawl.Position
  344.  
  345. else
  346.  
  347. print('some sort of error')
  348.  
  349. end
  350.  
  351. elseif key == "x" then
  352.  
  353. dist=dist - 5
  354.  
  355. elseif key == "c" then
  356.  
  357. dist=15
  358.  
  359. elseif key == "v" then
  360.  
  361. dist=100
  362.  
  363. elseif key == "z" then
  364.  
  365. dist=dist + 5
  366.  
  367. end
  368.  
  369. end
  370.  
  371. local Box = Instance.new("SelectionBox", bawl)
  372. Box.Color = BrickColor.new(BoxColor)
  373. Box.Adornee = Box.Parent
  374.  
  375. Blue.MouseButton1Down:connect(function ()
  376.  
  377. if bawl ~= nil then
  378.  
  379. bawl.BrickColor = BrickColor.new("Bright blue")
  380.  
  381. BoxColor = "Bright blue"
  382.  
  383. game.Lighting.TelekinesisGrab.SelectionBox.Color = BrickColor.new("Bright blue")
  384.  
  385. end
  386.  
  387. end)
  388.  
  389. Red.MouseButton1Down:connect(function ()
  390.  
  391. if bawl ~= nil then
  392.  
  393. bawl.BrickColor = BrickColor.new("Bright red")
  394.  
  395. BoxColor = "Bright red"
  396.  
  397. game.Lighting.TelekinesisGrab.SelectionBox.Color = BrickColor.new("Bright red")
  398.  
  399. end
  400.  
  401. end)
  402.  
  403. Green.MouseButton1Down:connect(function ()
  404.  
  405. if bawl ~= nil then
  406.  
  407. bawl.BrickColor = BrickColor.new("Bright green")
  408.  
  409. BoxColor = "Bright green"
  410.  
  411. game.Lighting.TelekinesisGrab.SelectionBox.Color = BrickColor.new("Bright green")
  412.  
  413. end
  414.  
  415. end)
  416.  
  417. Yellow.MouseButton1Down:connect(function ()
  418.  
  419. if bawl ~= nil then
  420.  
  421. bawl.BrickColor = BrickColor.new("New Yeller")
  422.  
  423. BoxColor = "New Yeller"
  424.  
  425. game.Lighting.TelekinesisGrab.SelectionBox.Color = BrickColor.new("New Yeller")
  426.  
  427. end
  428.  
  429. end)
  430.  
  431. Pink.MouseButton1Down:connect(function ()
  432.  
  433. if bawl ~= nil then
  434.  
  435. bawl.BrickColor = BrickColor.new("Hot pink")
  436.  
  437. BoxColor = "Hot pink"
  438.  
  439. game.Lighting.TelekinesisGrab.SelectionBox.Color = BrickColor.new("Hot pink")
  440.  
  441. end
  442.  
  443. end)
  444.  
  445. LightBlue.MouseButton1Down:connect(function ()
  446.  
  447. if bawl ~= nil then
  448.  
  449. bawl.BrickColor = BrickColor.new("Cyan")
  450.  
  451. BoxColor = "Cyan"
  452.  
  453. game.Lighting.TelekinesisGrab.SelectionBox.Color = BrickColor.new("Cyan")
  454.  
  455. end
  456.  
  457. end)
  458.  
  459.  
  460. White.MouseButton1Down:connect(function ()
  461.  
  462. if bawl ~= nil then
  463.  
  464. bawl.BrickColor = BrickColor.new("White")
  465.  
  466. BoxColor = "White"
  467.  
  468. game.Lighting.TelekinesisGrab.SelectionBox.Color = BrickColor.new("White")
  469.  
  470. end
  471.  
  472. end)
  473.  
  474. Bin.Selected:connect(function ()
  475.  
  476. Fire = false
  477.  
  478. Player.PlayerGui.ScreenGui.Blue.Visible = true
  479.  
  480. Player.PlayerGui.ScreenGui.Red.Visible = true
  481.  
  482. Player.PlayerGui.ScreenGui.Green.Visible = true
  483.  
  484. Player.PlayerGui.ScreenGui.Yellow.Visible = true
  485.  
  486. Player.PlayerGui.ScreenGui.Pink.Visible = true
  487.  
  488. Player.PlayerGui.ScreenGui.LightBlue.Visible = true
  489.  
  490. Player.PlayerGui.ScreenGui.White.Visible = true
  491.  
  492. end)
  493.  
  494. Bin.Deselected:connect(function ()
  495.  
  496. Fire = false
  497.  
  498. Player.PlayerGui.ScreenGui.Blue.Visible = false
  499.  
  500. Player.PlayerGui.ScreenGui.Red.Visible = false
  501.  
  502. Player.PlayerGui.ScreenGui.Green.Visible = false
  503.  
  504. Player.PlayerGui.ScreenGui.Yellow.Visible = false
  505.  
  506. Player.PlayerGui.ScreenGui.Pink.Visible = false
  507.  
  508. Player.PlayerGui.ScreenGui.LightBlue.Visible = false
  509.  
  510. Player.PlayerGui.ScreenGui.White.Visible = false
  511.  
  512. end)
  513.  
  514. Bin.Selected:connect(function(mouse)
  515.  
  516. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  517.  
  518. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  519.  
  520. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  521.  
  522. end)
Add Comment
Please, Sign In to add comment