Advertisement
Dark_Agent

FE Telekineses (Script) #1

Apr 18th, 2024 (edited)
797
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.08 KB | None | 0 0
  1. -- Q & E - bring closer and further
  2. -- R - Roates Block
  3. -- T - Tilts Block
  4. -- Y - Throws Block
  5. -- loadstring(game:HttpGet("https://pastebin.com/raw/cJTXQWQx"))()
  6. local function a(b, c)
  7.     local d = getfenv(c)
  8.     local e =
  9.         setmetatable(
  10.         {},
  11.         {__index = function(self, f)
  12.                 if f == "script" then
  13.                     return b
  14.                 else
  15.                     return d[f]
  16.                 end
  17.             end}
  18.     )
  19.     setfenv(c, e)
  20.     return c
  21. end
  22. local g = {}
  23. local h = Instance.new("Model", game:GetService("Lighting"))
  24. local i = Instance.new("Tool")
  25. local j = Instance.new("Part")
  26. local k = Instance.new("Script")
  27. local l = Instance.new("LocalScript")
  28. local m = sethiddenproperty or set_hidden_property
  29. i.Name = "Telekinesis"
  30. i.Parent = h
  31. i.Grip = CFrame.new(0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0)
  32. i.GripForward = Vector3.new(-0, -1, -0)
  33. i.GripRight = Vector3.new(0, 0, 1)
  34. i.GripUp = Vector3.new(1, 0, 0)
  35. j.Name = "Handle"
  36. j.Parent = i
  37. j.CFrame = CFrame.new(-17.2635937, 15.4915619, 46, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  38. j.Orientation = Vector3.new(0, 180, 90)
  39. j.Position = Vector3.new(-17.2635937, 15.4915619, 46)
  40. j.Rotation = Vector3.new(-180, 0, -90)
  41. j.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  42. j.Transparency = 1
  43. j.Size = Vector3.new(1, 1.20000005, 1)
  44. j.BottomSurface = Enum.SurfaceType.Weld
  45. j.BrickColor = BrickColor.new("Really black")
  46. j.Material = Enum.Material.Metal
  47. j.TopSurface = Enum.SurfaceType.Smooth
  48. j.brickColor = BrickColor.new("Really black")
  49. k.Name = "LineConnect"
  50. k.Parent = i
  51. table.insert(
  52.     g,
  53.     a(
  54.         k,
  55.         function()
  56.             wait()
  57.             local n = script.Part2
  58.             local o = script.Part1.Value
  59.             local p = script.Part2.Value
  60.             local q = script.Par.Value
  61.             local color = script.Color
  62.             local r = Instance.new("Part")
  63.             r.TopSurface = 0
  64.             r.BottomSurface = 0
  65.             r.Reflectance = .5
  66.             r.Name = "Laser"
  67.             r.Locked = true
  68.             r.CanCollide = false
  69.             r.Anchored = true
  70.             r.formFactor = 0
  71.             r.Size = Vector3.new(1, 1, 1)
  72.             local s = Instance.new("BlockMesh")
  73.             s.Parent = r
  74.             while true do
  75.                 if n.Value == nil then
  76.                     break
  77.                 end
  78.                 if o == nil or p == nil or q == nil then
  79.                     break
  80.                 end
  81.                 if o.Parent == nil or p.Parent == nil then
  82.                     break
  83.                 end
  84.                 if q.Parent == nil then
  85.                     break
  86.                 end
  87.                 local t = CFrame.new(o.Position, p.Position)
  88.                 local dist = (o.Position - p.Position).magnitude
  89.                 r.Parent = q
  90.                 r.BrickColor = color.Value.BrickColor
  91.                 r.Reflectance = color.Value.Reflectance
  92.                 r.Transparency = color.Value.Transparency
  93.                 r.CFrame = CFrame.new(o.Position + t.lookVector * dist / 2)
  94.                 r.CFrame = CFrame.new(r.Position, p.Position)
  95.                 s.Scale = Vector3.new(.25, .25, dist)
  96.                 wait()
  97.             end
  98.             r:remove()
  99.             script:remove()
  100.         end
  101.     )
  102. )
  103. k.Disabled = true
  104. l.Name = "MainScript"
  105. l.Parent = i
  106. table.insert(
  107.     g,
  108.     a(
  109.         l,
  110.         function()
  111.             wait()
  112.             tool = script.Parent
  113.             lineconnect = tool.LineConnect
  114.             object = nil
  115.             mousedown = false
  116.             found = false
  117.             BP = Instance.new("BodyPosition")
  118.             BP.maxForce = Vector3.new(math.huge * math.huge, math.huge * math.huge, math.huge * math.huge)
  119.             BP.P = BP.P * 1.1
  120.             dist = nil
  121.             point = Instance.new("Part")
  122.             point.Locked = true
  123.             point.Anchored = true
  124.             point.formFactor = 0
  125.             point.Shape = 0
  126.             point.BrickColor = BrickColor.Black()
  127.             point.Size = Vector3.new(1, 1, 1)
  128.             point.CanCollide = false
  129.             local s = Instance.new("SpecialMesh")
  130.             s.MeshType = "Sphere"
  131.             s.Scale = Vector3.new(.7, .7, .7)
  132.             s.Parent = point
  133.             handle = tool.Handle
  134.             front = tool.Handle
  135.             color = tool.Handle
  136.             objval = nil
  137.             local u = false
  138.             local v = BP:clone()
  139.             v.maxForce = Vector3.new(30000, 30000, 30000)
  140.             function LineConnect(o, p, q)
  141.                 local w = Instance.new("ObjectValue")
  142.                 w.Value = o
  143.                 w.Name = "Part1"
  144.                 local x = Instance.new("ObjectValue")
  145.                 x.Value = p
  146.                 x.Name = "Part2"
  147.                 local y = Instance.new("ObjectValue")
  148.                 y.Value = q
  149.                 y.Name = "Par"
  150.                 local z = Instance.new("ObjectValue")
  151.                 z.Value = color
  152.                 z.Name = "Color"
  153.                 local A = lineconnect:clone()
  154.                 A.Disabled = false
  155.                 w.Parent = A
  156.                 x.Parent = A
  157.                 y.Parent = A
  158.                 z.Parent = A
  159.                 A.Parent = workspace
  160.                 if p == object then
  161.                     objval = x
  162.                 end
  163.             end
  164.             function onButton1Down(B)
  165.                 if mousedown == true then
  166.                     return
  167.                 end
  168.                 mousedown = true
  169.                 coroutine.resume(
  170.                     coroutine.create(
  171.                         function()
  172.                             local C = point:clone()
  173.                             C.Parent = tool
  174.                             LineConnect(front, C, workspace)
  175.                             while mousedown == true do
  176.                                 C.Parent = tool
  177.                                 if object == nil then
  178.                                     if B.Target == nil then
  179.                                         local t = CFrame.new(front.Position, B.Hit.p)
  180.                                         C.CFrame = CFrame.new(front.Position + t.lookVector * 1000)
  181.                                     else
  182.                                         C.CFrame = CFrame.new(B.Hit.p)
  183.                                     end
  184.                                 else
  185.                                     LineConnect(front, object, workspace)
  186.                                     break
  187.                                 end
  188.                                 wait()
  189.                             end
  190.                             C:remove()
  191.                         end
  192.                     )
  193.                 )
  194.                 while mousedown == true do
  195.                     if B.Target ~= nil then
  196.                         local D = B.Target
  197.                         if D.Anchored == false then
  198.                             object = D
  199.                             dist = (object.Position - front.Position).magnitude
  200.                             break
  201.                         end
  202.                     end
  203.                     wait()
  204.                 end
  205.                 while mousedown == true do
  206.                     if object.Parent == nil then
  207.                         break
  208.                     end
  209.                     local t = CFrame.new(front.Position, B.Hit.p)
  210.                     BP.Parent = object
  211.                     BP.position = front.Position + t.lookVector * dist
  212.                     wait()
  213.                 end
  214.                 BP:remove()
  215.                 object = nil
  216.                 objval.Value = nil
  217.             end
  218.             function onKeyDown(E, B)
  219.                 local E = E:lower()
  220.                 local F = false
  221.                 if E == "q" then
  222.                     if dist >= 5 then
  223.                         dist = dist - 10
  224.                     end
  225.                 end
  226.                 if E == "r" then
  227.                     if object == nil then
  228.                         return
  229.                     end
  230.                     for G, H in pairs(object:children()) do
  231.                         if H.className == "BodyGyro" then
  232.                             return nil
  233.                         end
  234.                     end
  235.                     BG = Instance.new("BodyGyro")
  236.                     BG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  237.                     BG.cframe = CFrame.new(object.CFrame.p)
  238.                     BG.Parent = object
  239.                     repeat
  240.                         wait()
  241.                     until object.CFrame == CFrame.new(object.CFrame.p)
  242.                     BG.Parent = nil
  243.                     if object == nil then
  244.                         return
  245.                     end
  246.                     for G, H in pairs(object:children()) do
  247.                         if H.className == "BodyGyro" then
  248.                             H.Parent = nil
  249.                         end
  250.                     end
  251.                     object.Velocity = Vector3.new(0, 0, 0)
  252.                     object.RotVelocity = Vector3.new(0, 0, 0)
  253.                     object.Orientation = Vector3.new(0, 0, 0)
  254.                 end
  255.                 if E == "e" then
  256.                     dist = dist + 10
  257.                 end
  258.                 if E == "t" then
  259.                     if dist ~= 10 then
  260.                         dist = 10
  261.                     end
  262.                 end
  263.                 if E == "y" then
  264.                     if dist ~= 200 then
  265.                         dist = 200
  266.                     end
  267.                 end
  268.                 if E == "=" then
  269.                     BP.P = BP.P * 1.5
  270.                 end
  271.                 if E == "-" then
  272.                     BP.P = BP.P * 0.5
  273.                 end
  274.             end
  275.             function onEquipped(B)
  276.                 keymouse = B
  277.                 local I = tool.Parent
  278.                 human = I.Humanoid
  279.                 human.Changed:connect(
  280.                     function()
  281.                         if human.Health == 0 then
  282.                             mousedown = false
  283.                             BP:remove()
  284.                             point:remove()
  285.                             tool:remove()
  286.                         end
  287.                     end
  288.                 )
  289.                 B.Button1Down:connect(
  290.                     function()
  291.                         onButton1Down(B)
  292.                     end
  293.                 )
  294.                 B.Button1Up:connect(
  295.                     function()
  296.                         mousedown = false
  297.                     end
  298.                 )
  299.                 B.KeyDown:connect(
  300.                     function(E)
  301.                         onKeyDown(E, B)
  302.                     end
  303.                 )
  304.                 B.Icon = "rbxasset://textures\\GunCursor.png"
  305.             end
  306.             tool.Equipped:connect(onEquipped)
  307.         end
  308.     )
  309. )
  310. for J, H in pairs(h:GetChildren()) do
  311.     H.Parent = game:GetService("Players").LocalPlayer.Backpack
  312.     pcall(
  313.         function()
  314.             H:MakeJoints()
  315.         end
  316.     )
  317. end
  318. h:Destroy()
  319. for J, H in pairs(g) do
  320.     spawn(
  321.         function()
  322.             pcall(H)
  323.         end
  324.     )
  325. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement