R

fe telek

public
rrixh Apr 05, 2024 Never 51
Clone
Lua FEteleknesisv3_lulaslollipop.mp3 330 lines (303 loc) | 8.85 KB
1
local Sound = Instance.new("Sound", workspace)
2
Sound.SoundId = "rbxassetid://1092093337"
3
Sound:Play()
4
5
pcall(function()
6
7
game.StarterGui:SetCore("SendNotification", {
8
9
Title = 'Telekenisis V3';
10
Text = 'Hey! Thanks for using the script!';
11
Duration = 20;
12
13
})
14
end)
15
16
17
18
--[[
19
Telekinisis V3
20
21
Controls:
22
23
Q - brings closer
24
E - goes further
25
Y - throws the block
26
L - makes the block straight and locked into front part -- sorry for bad england
27
J - Mega Throw
28
X - goes further a little
29
U - makes the block spin
30
P - makes the block float -- im proud of this
31
32
33
--]]
34
35
--[[
36
FOR DA HOOD>>....
37
38
IF YOU WANT TO FULLY CONTROL THE PLAYER YOU WOULD HAVE TO THROW THE PLAYER AND IT WORKS.
39
40
IF SOMEONE GETS CLOSE TO THE PLAYER THAT YOU ARE CONTROLLING, YOU WILL LOSE POWER SO TRY TO ASK THEM TO MOVE.
41
42
IF YOU JOINED A NEW SERVER AND YOU EXECUTED THE SCRIPT, MAKE SURE YOU EXECUTE THEN RESET SO YOU CAN HAVE MORE POWER. -- if necessary or not but important
43
44
THIS IS JUST A BETA TELEKINISIS SCRIPT.
45
46
]]
47
48
local number = 3 --faster movement. less bounceback.
49
50
51
function sandbox(var,func)
52
local env = getfenv(func)
53
local newenv = setmetatable({},{
54
__index = function(self,k)
55
if k=="script" then
56
return var
57
else
58
return env[k]
59
end
60
end,
61
})
62
setfenv(func,newenv)
63
return func
64
end
65
cors = {}
66
mas = Instance.new("Model",game:GetService("Lighting"))
67
Tool0 = Instance.new("Tool")
68
Part1 = Instance.new("Part")
69
Script2 = Instance.new("Script")
70
LocalScript3 = Instance.new("LocalScript")
71
Tool0.Name = "Grab"
72
Tool0.Parent = mas
73
Tool0.Grip = CFrame.new(0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
74
Tool0.GripPos = Vector3.new(0, 0, 1)
75
Part1.Name = "Handle"
76
Part1.Parent = Tool0
77
Part1.CFrame = CFrame.new(-3.5, 5.30000019, -3.5, 1, 0, 0, 0, -1, 0, 0, 0, -1)
78
Part1.Orientation = Vector3.new(0, 180, 180)
79
Part1.Position = Vector3.new(-3.5, 5.300000190734863, -3.5)
80
Part1.Rotation = Vector3.new(-180, 0, 0)
81
Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
82
Part1.Transparency = 1
83
Part1.Size = Vector3.new(1, 1, 1)
84
Part1.BottomSurface = Enum.SurfaceType.Smooth
85
Part1.BrickColor = BrickColor.new("Institutional white")
86
Part1.Locked = true
87
Part1.TopSurface = Enum.SurfaceType.Smooth
88
Part1.brickColor = BrickColor.new("Institutional white")
89
Script2.Name = "LineConnect"
90
Script2.Parent = Tool0
91
table.insert(cors,sandbox(Script2,function()
92
wait()
93
local check = script.Part2
94
local part1 = script.Part1.Value
95
local part2 = script.Part2.Value
96
local parent = script.Par.Value
97
local color = script.Color
98
local line = Instance.new("Part")
99
line.TopSurface = 0
100
line.BottomSurface = 0
101
line.Reflectance = .5
102
line.Name = "Laser"
103
line.Locked = true
104
line.CanCollide = false
105
line.Anchored = true
106
line.formFactor = 0
107
line.Size = Vector3.new(1,1,1)
108
local mesh = Instance.new("BlockMesh")
109
mesh.Parent = line
110
while true do
111
if (check.Value==nil) then break end
112
if (part1==nil or part2==nil or parent==nil) then break end
113
if (part1.Parent==nil or part2.Parent==nil) then break end
114
if (parent.Parent==nil) then break end
115
local lv = CFrame.new(part1.Position,part2.Position)
116
local dist = (part1.Position-part2.Position).magnitude
117
line.Parent = parent
118
line.BrickColor = color.Value.BrickColor
119
line.Reflectance = color.Value.Reflectance
120
line.Transparency = color.Value.Transparency
121
line.CFrame = CFrame.new(part1.Position+lv.lookVector*dist/2)
122
line.CFrame = CFrame.new(line.Position,part2.Position)
123
mesh.Scale = Vector3.new(.25,.25,dist)
124
wait()
125
end
126
line:remove()
127
script:remove()
128
end))
129
Script2.Disabled = true
130
LocalScript3.Name = "MainScript"
131
LocalScript3.Parent = Tool0
132
table.insert(cors,sandbox(LocalScript3,function()
133
wait()
134
tool = script.Parent
135
lineconnect = tool.LineConnect
136
object = nil
137
mousedown = false
138
found = false
139
BP = Instance.new("BodyPosition")
140
BP.maxForce = Vector3.new(math.huge*math.huge,math.huge*math.huge,math.huge*math.huge) --pwns everyone elses bodyposition
141
BP.P = BP.P*number
142
dist = nil
143
point = Instance.new("Part")
144
point.Locked = true
145
point.Anchored = true
146
point.formFactor = 0
147
point.Shape = 0
148
point.BrickColor = BrickColor.Black()
149
point.Size = Vector3.new(1,1,1)
150
point.CanCollide = false
151
local mesh = Instance.new("SpecialMesh")
152
mesh.MeshType = "Sphere"
153
mesh.Scale = Vector3.new(.7,.7,.7)
154
mesh.Parent = point
155
handle = tool.Handle
156
front = tool.Handle
157
color = tool.Handle
158
objval = nil
159
local hooked = false
160
local hookBP = BP:clone()
161
hookBP.maxForce = Vector3.new(30000,30000,30000)
162
163
function LineConnect(part1,part2,parent)
164
local p1 = Instance.new("ObjectValue")
165
p1.Value = part1
166
p1.Name = "Part1"
167
local p2 = Instance.new("ObjectValue")
168
p2.Value = part2
169
p2.Name = "Part2"
170
local par = Instance.new("ObjectValue")
171
par.Value = parent
172
par.Name = "Par"
173
local col = Instance.new("ObjectValue")
174
col.Value = color
175
col.Name = "Color"
176
local s = lineconnect:clone()
177
s.Disabled = false
178
p1.Parent = s
179
p2.Parent = s
180
par.Parent = s
181
col.Parent = s
182
s.Parent = workspace
183
if (part2==object) then
184
objval = p2
185
end
186
end
187
188
function onButton1Down(mouse)
189
if (mousedown==true) then return end
190
mousedown = true
191
coroutine.resume(coroutine.create(function()
192
local p = point:clone()
193
p.Parent = tool
194
LineConnect(front,p,workspace)
195
while (mousedown==true) do
196
p.Parent = tool
197
if (object==nil) then
198
if (mouse.Target==nil) then
199
local lv = CFrame.new(front.Position,mouse.Hit.p)
200
p.CFrame = CFrame.new(front.Position+(lv.lookVector*1000))
201
else
202
p.CFrame = CFrame.new(mouse.Hit.p)
203
end
204
else
205
LineConnect(front,object,workspace)
206
break
207
end
208
wait()
209
end
210
p:remove()
211
end))
212
while (mousedown==true) do
213
if (mouse.Target~=nil) then
214
local t = mouse.Target
215
if (t.Anchored==false) then
216
object = t
217
dist = (object.Position-front.Position).magnitude
218
break
219
end
220
end
221
wait()
222
end
223
while (mousedown==true) do
224
if (object.Parent==nil) then break end
225
local lv = CFrame.new(front.Position,mouse.Hit.p)
226
BP.Parent = object
227
BP.position = front.Position+lv.lookVector*dist
228
wait()
229
end
230
BP:remove()
231
object = nil
232
objval.Value = nil
233
end
234
235
function onKeyDown(key,mouse)
236
local key = key:lower()
237
local yesh = false
238
if (key=="q") then
239
if (dist>=5) then
240
dist = dist-5
241
end
242
end
243
if (key=="u") then
244
if (dist ~=1) then
245
BX = Instance.new("BodyGyro")
246
BX.MaxTorque = Vector3.new(math.huge,0,math.huge)
247
BX.CFrame = BX.CFrame * CFrame.Angles(0, math.rad(45), 0)
248
BX.D = 0
249
BX.Parent = object
250
--object.CFrame = CFrame.Angles(math.rad(90), 0,0) -- not used
251
--object.Orientation = Vector3.new(50,0,0)
252
--BX.Orientation = Vector3.new(23,0,0)
253
254
end
255
end
256
if (key=="p") then
257
if (dist ~=1) then
258
BX = Instance.new("BodyVelocity")
259
BX.maxForce = Vector3.new(0,math.huge,0)
260
BX.velocity = Vector3.new(0,1,0)
261
--BX.CFrame = BX.CFrame * CFrame.Angles(0, math.rad(45), 0)
262
BX.Parent = object
263
264
end
265
end
266
if key == "l" then
267
if (object==nil) then return end
268
for _,v in pairs(object:children()) do
269
if v.className == "BodyGyro" then
270
return nil
271
end
272
end
273
BG = Instance.new("BodyGyro")
274
BG.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
275
BG.cframe = CFrame.new(object.CFrame.p)
276
BG.Parent = object
277
repeat wait() until(object.CFrame == CFrame.new(object.CFrame.p))
278
BG.Parent = nil
279
if (object==nil) then return end
280
for _,v in pairs(object:children()) do
281
if v.className == "BodyGyro" then
282
v.Parent = nil
283
end
284
end
285
object.Velocity = Vector3.new(0,0,0)
286
object.RotVelocity = Vector3.new(0,0,0)
287
end
288
if (key=="y") then
289
if (dist ~=100) then
290
dist = 100
291
end
292
end
293
if (key=="j") then
294
if (dist~=5000) then
295
dist = 5000
296
end
297
end
298
if (key=="e") then
299
dist = dist+5
300
end
301
if (key=="x") then
302
if dist ~= 15 then
303
dist = 15
304
end
305
end
306
end
307
308
function onEquipped(mouse)
309
keymouse = mouse
310
local char = tool.Parent
311
human = char.Humanoid
312
human.Changed:connect(function() if (human.Health==0) then mousedown = false BP:remove() point:remove() tool:remove() end end)
313
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
314
mouse.Button1Up:connect(function() mousedown = false end)
315
mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
316
mouse.Icon = "rbxasset://textures\\GunCursor.png"
317
end
318
319
tool.Equipped:connect(onEquipped)
320
end))
321
for i,v in pairs(mas:GetChildren()) do
322
v.Parent = game:GetService("Players").LocalPlayer.Backpack
323
pcall(function() v:MakeJoints() end)
324
end
325
mas:Destroy()
326
for i,v in pairs(cors) do
327
spawn(function()
328
pcall(v)
329
end)
330
end