Advertisement
Dark_Agent

FE Telekineses by Im_Patrick

Apr 21st, 2025
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.11 KB | Gaming | 0 0
  1. -- https://www.youtube.com/@Im_Patrick
  2. local re=game:GetService("Workspace")
  3. local sandbox=function(var,func)
  4.     local env=getfenv(func)
  5.     local newenv=setmetatable({},{
  6.         __index=function(self,k)
  7.             if k=="script" then
  8.                 return var
  9.             else
  10.                 return env[k]
  11.             end
  12.         end,
  13.     })
  14.     setfenv(func,newenv)
  15.     return func
  16. end
  17. cors={}
  18. local _Name="Telekinesis V6"
  19. local uis=game:GetService("UserInputService")
  20. local _Ins, _CF_new, _VTR_new=Instance.new, CFrame.new, Vector3.new
  21. mas=_Ins("Model",game:GetService("Lighting"))
  22. local con=getfenv().sethiddenproperty
  23. Tool0=_Ins("Tool")
  24. Part1=_Ins("Part")
  25. Script2=_Ins("Script")
  26. local light=_Ins("Highlight", Tool0)
  27. light.FillTransparency = 1
  28. LocalScript3=_Ins("LocalScript")
  29. re=game:GetService("RunService")
  30. Tool0.Name=_Name
  31. Tool0.Parent=mas
  32. Tool0.Grip=_CF_new(0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  33. Tool0.GripPos=_VTR_new(0, 0, 1)
  34. Part1.Name="Handle"
  35. Part1.Parent=Tool0
  36. local changed="Changed"
  37. Part1.CFrame=_CF_new(-3.5, 5.30000019, -3.5, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  38. Part1.Orientation=_VTR_new(0, 180, 180)
  39. Part1.Position=_VTR_new(-3.5, 5.300000190734863, -3.5)
  40. Part1.Rotation=_VTR_new(-180, 0, 0)
  41. Part1.Color=Color3.new(0.972549, 0.972549, 0.972549)
  42. Part1.Transparency=1
  43. local cam=re.RenderStepped
  44. local w=wait
  45. Part1.Size=_VTR_new(1, 1, 1)
  46. Part1.BottomSurface=Enum.SurfaceType.Smooth
  47. Part1.BrickColor=BrickColor.new("Institutional white")
  48. Part1.Locked=true
  49. local speed=55
  50. local mb=uis.TouchEnabled
  51. Part1.TopSurface=Enum.SurfaceType.Smooth
  52. Part1.brickColor=BrickColor.new("Institutional white")
  53. Script2.Name="LineConnect"
  54. Script2.Parent=Tool0
  55. light.Adornee=nil
  56. local Sound=_Ins("Sound", game.Workspace)
  57. Sound.SoundId="rbxassetid://1092093337"
  58. Sound:Play()
  59. cam:Connect(function() if con then con(game:GetService("Players").LocalPlayer, changed, speed) end end)
  60. table.insert(cors,sandbox(Script2,function()
  61.     w()
  62.     local check=script.Part2
  63.     local part1=script.Part1.Value
  64.     local part2=script.Part2.Value
  65.     local parent=script.Par.Value
  66.     local color=script.Color
  67.     local line=_Ins("Part")
  68.     line.TopSurface=0
  69.     line.BottomSurface=0
  70.     line.Reflectance=.5
  71.     line.Name="Laser"
  72.     line.Locked=true
  73.     line.CanCollide=false
  74.     line.Anchored=true
  75.     line.formFactor=0
  76.     line.Size=_VTR_new(1,1,1)
  77.     local mesh=_Ins("BlockMesh")
  78.     mesh.Parent=line
  79.     while true do
  80.         if (check.Value==nil) then break end
  81.         if (part1==nil or part2==nil or parent==nil) then break end
  82.         if (part1.Parent==nil or part2.Parent==nil) then break end
  83.         if (parent.Parent==nil) then break end
  84.         local lv=_CF_new(part1.Position,part2.Position)
  85.         local dist=(part1.Position-part2.Position).magnitude
  86.         line.Parent=parent
  87.         line.BrickColor=color.Value.BrickColor
  88.         line.Reflectance=color.Value.Reflectance
  89.         line.Transparency=color.Value.Transparency
  90.         line.CFrame=_CF_new(part1.Position+lv.lookVector*dist/2)
  91.         line.CFrame=_CF_new(line.Position,part2.Position)
  92.         mesh.Scale=_VTR_new(.25,.25,dist)
  93.         w()
  94.     end
  95.     line:remove()
  96.     script:remove()
  97. end))
  98. changed="SimulationRadius"
  99. Script2.Disabled=true
  100. LocalScript3.Name="MainScript"
  101. LocalScript3.Parent=Tool0
  102. table.insert(cors,sandbox(LocalScript3,function()
  103.     w()
  104.     tool=script.Parent
  105.     lineconnect=tool.LineConnect
  106.     object=nil
  107.     mousedown=false
  108.     found=false
  109.     BP=_Ins("BodyPosition")
  110.     BP.maxForce=_VTR_new(math.huge*math.huge,math.huge*math.huge,math.huge*math.huge) --pwns everyone elses bodyposition
  111.     BP.P=BP.P*3
  112.     dist=nil
  113.     point=_Ins("Part")
  114.     point.Locked=true
  115.     point.Anchored=true
  116.     point.formFactor=0
  117.     point.Shape=0
  118.     point.BrickColor=BrickColor.Blue()
  119.     point.Size=_VTR_new(0,0,0)
  120.     point.CanCollide=false
  121.     local mesh=_Ins("SpecialMesh")
  122.     mesh.MeshType="Sphere"
  123.     mesh.Scale=_VTR_new(.7,.7,.7)
  124.     mesh.Parent=point
  125.     handle=tool.Handle
  126.     front=tool.Handle
  127.     color=tool.Handle
  128.     objval=nil
  129.     local hooked=false
  130.     local hookBP=BP:clone()
  131.     hookBP.maxForce=_VTR_new(30000,30000,30000)
  132.  
  133.     local LineConnect=function(part1,part2,parent)
  134.         local p1=_Ins("ObjectValue")
  135.         p1.Value=part1
  136.         p1.Name="Part1"
  137.         local p2=_Ins("ObjectValue")
  138.         p2.Value=part2
  139.         p2.Name="Part2"
  140.         local par=_Ins("ObjectValue")
  141.         par.Value=parent
  142.         par.Name="Par"
  143.         local col=_Ins("ObjectValue")
  144.         col.Value=color
  145.         col.Name="Color"
  146.         local s=lineconnect:clone()
  147.         s.Disabled=false
  148.         p1.Parent=s
  149.         p2.Parent=s
  150.         par.Parent=s
  151.         col.Parent=s
  152.         s.Parent=workspace
  153.         if (part2==object) then
  154.             objval=p2
  155.         end
  156.     end
  157.  
  158.     local onButton1Down=function(mouse)
  159.         if (mousedown==true) then return end
  160.         mousedown=true
  161.         coroutine.resume(coroutine.create(function()
  162.             local p=point:clone()
  163.             p.Parent=tool
  164.             LineConnect(front,p,workspace)
  165.             while (mousedown==true) do
  166.                 p.Parent=tool
  167.                 if (object==nil) then
  168.                     if (mouse.Target==nil) then
  169.                         local lv=_CF_new(front.Position,mouse.Hit.p)
  170.                         p.CFrame=_CF_new(front.Position+(lv.lookVector*1000))
  171.                     else
  172.                         p.CFrame=_CF_new(mouse.Hit.p)
  173.                     end
  174.                 else
  175.                     LineConnect(front,object,workspace)
  176.                     break
  177.                 end
  178.                 w()
  179.             end
  180.             p:remove()
  181.         end))
  182.         while (mousedown==true) do
  183.             if (mouse.Target~=nil) then
  184.                 local t=mouse.Target
  185.                 if (t.Anchored==false) then
  186.                     object=t
  187.                     light.Adornee=object
  188.                     dist=(object.Position-front.Position).magnitude
  189.                     break
  190.                 end
  191.             end
  192.             w()
  193.         end
  194.         while (mousedown==true) do
  195.             if (object.Parent==nil) then break end
  196.             local lv=_CF_new(front.Position,mouse.Hit.p)
  197.             BP.Parent=object
  198.             BP.position=front.Position+lv.lookVector*dist
  199.             w()
  200.         end
  201.         BP:remove()
  202.         object=nil
  203.         objval.Value=nil
  204.         light.Adornee=nil
  205.     end
  206.  
  207.     local onKeyDown=function(key,mouse)
  208.         local key=key:lower()
  209.         local yesh=false
  210.         if (key=="q") then
  211.             if (dist>=5) then
  212.                 dist=dist-5
  213.             end
  214.         end
  215.         if (key=="u") then
  216.             if (dist ~=1) then
  217.                 BX=_Ins("BodyGyro")
  218.                 BX.MaxTorque=_VTR_new(math.huge,0,math.huge)
  219.                 BX.CFrame=BX.CFrame * CFrame.Angles(0, math.rad(45), 0)
  220.                 BX.D=0
  221.                 BX.Parent=object
  222.                 --object.CFrame=CFrame.Angles(math.rad(90), 0,0) -- not used
  223.                 --object.Orientation=_VTR_new(50,0,0)
  224.                 --BX.Orientation=_VTR_new(23,0,0)
  225.             end
  226.         end
  227.         if (key=="p") then
  228.             if (dist ~=1) then
  229.                 BX=_Ins("BodyVelocity")
  230.                 BX.maxForce=_VTR_new(0,math.huge,0)
  231.                 BX.velocity=_VTR_new(0,1,0)
  232.                 --BX.CFrame=BX.CFrame * CFrame.Angles(0, math.rad(45), 0)
  233.                 BX.Parent=object
  234.             end
  235.         end
  236.         if key == "l" then
  237.             if (object==nil) then return end
  238.             for _,v in pairs(object:children()) do
  239.                 if v.className == "BodyGyro" then
  240.                     return nil
  241.                 end
  242.             end
  243.             BG=_Ins("BodyGyro")
  244.             BG.maxTorque=_VTR_new(math.huge,math.huge,math.huge)
  245.             BG.cframe=_CF_new(object.CFrame.p)
  246.             BG.Parent=object
  247.             repeat w() until(object.CFrame == _CF_new(object.CFrame.p))
  248.             BG.Parent=nil
  249.             if (object==nil) then return end
  250.             for _,v in pairs(object:children()) do
  251.                 if v.className == "BodyGyro" then
  252.                     v.Parent=nil
  253.                 end
  254.             end
  255.             object.Velocity=_VTR_new(0,0,0)
  256.             object.RotVelocity=_VTR_new(0,0,0)
  257.         end
  258.         if (key=="y") then
  259.             if (dist ~=100) then
  260.                 dist=100
  261.             end
  262.         end
  263.         if (key=="j") then
  264.             if (dist~=5000) then
  265.                 dist=5000
  266.             end
  267.         end
  268.         if (key=="e") then
  269.             dist=dist+5
  270.         end
  271.         if (key=="x") then
  272.             if dist ~= 15 then
  273.                 dist=15
  274.             end
  275.         end
  276.     end
  277.     local onEquipped=function(mouse)
  278.         keymouse=mouse
  279.         local char=tool.Parent
  280.         human=char.Humanoid
  281.         human.Changed:connect(function() if (human.Health==0) then mousedown=false BP:remove() point:remove() tool:remove() end end)
  282.         mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  283.         mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
  284.         if mb then
  285.             uis.TouchLongPress:Connect(function() onKeyDown("y",mouse) end)
  286.             uis.TouchEnded:Connect(function() mousedown=false end)
  287.         else
  288.             mouse.Button1Up:connect(function() mousedown=false end)
  289.         end
  290.     end
  291.     tool.Equipped:connect(onEquipped)
  292.     tool.Unequipped:connect(function() mousedown=false end)
  293. end))
  294. for i,v in pairs(mas:GetChildren()) do
  295.     v.Parent=game:GetService("Players").LocalPlayer.Backpack
  296.     pcall(function() v:MakeJoints() end)
  297. end
  298. mas:Destroy()
  299. for i,v in pairs(cors) do
  300.     spawn(function()
  301.         pcall(v)
  302.     end)
  303. end
  304. --https://www.youtube.com/@Im_Patrick
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement