Advertisement
C-H-4-0-S

Telekinisis

Nov 18th, 2023 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.72 KB | None | 0 0
  1. local function a(b, c)
  2. local d = getfenv(c)
  3. local e =
  4. setmetatable(
  5. {},
  6. {__index = function(self, f)
  7. if f == "script" then
  8. return b
  9. else
  10. return d[f]
  11. end
  12. end}
  13. )
  14. setfenv(c, e)
  15. return c
  16. end
  17. local power = 50
  18. local usrinput = game:GetService("UserInputService")
  19. local g = {}
  20. local h = Instance.new("Model", game:GetService("Lighting"))
  21. local i = Instance.new("Tool")
  22. local j = Instance.new("Part")
  23. local k = Instance.new("Script")
  24. local l = Instance.new("LocalScript")
  25. local m = sethiddenproperty or set_hidden_property
  26. i.Name = "Telekinesis"
  27. i.Parent = h
  28. i.Grip = CFrame.new(0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0)
  29. i.GripForward = Vector3.new(-0, -1, -0)
  30. i.GripRight = Vector3.new(0, 0, 1)
  31. i.GripUp = Vector3.new(1, 0, 0)
  32. j.Name = "Handle"
  33. j.Parent = i
  34. j.CFrame = CFrame.new(-17.2635937, 15.4915619, 46, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  35. j.Orientation = Vector3.new(0, 180, 90)
  36. j.Position = Vector3.new(-17.2635937, 15.4915619, 46)
  37. j.Rotation = Vector3.new(-180, 0, -90)
  38. j.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  39. j.Transparency = 1
  40. j.Size = Vector3.new(1, 1.20000005, 1)
  41. j.BottomSurface = Enum.SurfaceType.Weld
  42. j.BrickColor = BrickColor.new("Really black")
  43. j.Material = Enum.Material.Metal
  44. j.TopSurface = Enum.SurfaceType.Smooth
  45. j.brickColor = BrickColor.new("Really black")
  46. k.Name = "LineConnect"
  47. k.Parent = i
  48. table.insert(
  49. g,
  50. a(
  51. k,
  52. function()
  53. wait()
  54. local n = script.Part2
  55. local o = script.Part1.Value
  56. local p = script.Part2.Value
  57. local q = script.Par.Value
  58. local color = script.Color
  59. local r = Instance.new("Part")
  60. r.TopSurface = 0
  61. r.BottomSurface = 0
  62. r.Reflectance = .5
  63. r.Name = "Laser"
  64. r.Locked = true
  65. r.CanCollide = false
  66. r.Anchored = true
  67. r.formFactor = 0
  68. r.Size = Vector3.new(1, 1, 1)
  69. local s = Instance.new("BlockMesh")
  70. s.Parent = r
  71. while true do
  72. if n.Value == nil then
  73. break
  74. end
  75. if o == nil or p == nil or q == nil then
  76. break
  77. end
  78. if o.Parent == nil or p.Parent == nil then
  79. break
  80. end
  81. if q.Parent == nil then
  82. break
  83. end
  84. local t = CFrame.new(o.Position, p.Position)
  85. local dist = (o.Position - p.Position).magnitude
  86. r.Parent = q
  87. r.BrickColor = color.Value.BrickColor
  88. r.Reflectance = color.Value.Reflectance
  89. r.Transparency = color.Value.Transparency
  90. r.CFrame = CFrame.new(o.Position + t.lookVector * dist / 2)
  91. r.CFrame = CFrame.new(r.Position, p.Position)
  92. s.Scale = Vector3.new(.25, .25, dist)
  93. wait()
  94. end
  95. r:remove()
  96. script:remove()
  97. end
  98. )
  99. )
  100. k.Disabled = true
  101. l.Name = "MainScript"
  102. l.Parent = i
  103. table.insert(
  104. g,
  105. a(
  106. l,
  107. function()
  108. wait()
  109. tool = script.Parent
  110. lineconnect = tool.LineConnect
  111. object = nil
  112. mousedown = false
  113. found = false
  114. BP = Instance.new("BodyPosition")
  115. BP.maxForce = Vector3.new(math.huge * math.huge, math.huge * math.huge, math.huge * math.huge)
  116. BP.P = BP.P * 1.1
  117. dist = nil
  118. point = Instance.new("Part")
  119. point.Locked = true
  120. point.Anchored = true
  121. point.formFactor = 0
  122. point.Shape = 0
  123. point.BrickColor = BrickColor.Black()
  124. point.Size = Vector3.new(1, 1, 1)
  125. point.CanCollide = false
  126. local s = Instance.new("SpecialMesh")
  127. s.MeshType = "Sphere"
  128. s.Scale = Vector3.new(.7, .7, .7)
  129. s.Parent = point
  130. handle = tool.Handle
  131. front = tool.Handle
  132. color = tool.Handle
  133. objval = nil
  134. local u = false
  135. local v = BP:clone()
  136. v.maxForce = Vector3.new(30000, 30000, 30000)
  137. function LineConnect(o, p, q)
  138. local w = Instance.new("ObjectValue")
  139. w.Value = o
  140. w.Name = "Part1"
  141. local x = Instance.new("ObjectValue")
  142. x.Value = p
  143. x.Name = "Part2"
  144. local y = Instance.new("ObjectValue")
  145. y.Va
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement