SHOW:
|
|
- or go back to the newest paste.
1 | - | local plr = game.Players.LocalPlayer |
1 | + | -- This script has been converted to FE by iPxter |
2 | ||
3 | ||
4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
6 | do | |
7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") | |
8 | script.Parent = Player.Character | |
9 | ||
10 | --RemoteEvent for communicating | |
11 | local Event = Instance.new("RemoteEvent") | |
12 | Event.Name = "UserInput_Event" | |
13 | ||
14 | --Fake event to make stuff like Mouse.KeyDown work | |
15 | local function fakeEvent() | |
16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
17 | t.connect = t.Connect | |
18 | return t | |
19 | end | |
20 | ||
21 | --Creating fake input objects with fake variables | |
22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
26 | end} | |
27 | --Merged 2 functions into one by checking amount of arguments | |
28 | CAS.UnbindAction = CAS.BindAction | |
29 | ||
30 | --This function will trigger the events that have been :Connect()'ed | |
31 | local function te(self,ev,...) | |
32 | local t = m[ev] | |
33 | if t and t._fakeEvent and t.Function then | |
34 | t.Function(...) | |
35 | end | |
36 | end | |
37 | m.TrigEvent = te | |
38 | UIS.TrigEvent = te | |
39 | ||
40 | Event.OnServerEvent:Connect(function(plr,io) | |
41 | if plr~=Player then return end | |
42 | if io.isMouse then | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | else | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | for _,t in pairs(CAS.Actions) do | |
51 | for _,k in pairs(t.Keys) do | |
52 | if k==io.KeyCode then | |
53 | t.Function(t.Name,io.UserInputState,io) | |
54 | end | |
55 | end | |
56 | end | |
57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
59 | end | |
60 | end) | |
61 | Event.Parent = NLS([==[ | |
62 | local Player = game:GetService("Players").Rohan_Kishiba | |
63 | local Event = script:WaitForChild("UserInput_Event") | |
64 | ||
65 | local UIS = game:GetService("UserInputService") | |
66 | local input = function(io,a) | |
67 | if a then return end | |
68 | --Since InputObject is a client-side instance, we create and pass table instead | |
69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
70 | end | |
71 | UIS.InputBegan:Connect(input) | |
72 | UIS.InputEnded:Connect(input) | |
73 | ||
74 | local Mouse = Player:GetMouse() | |
75 | local h,t | |
76 | --Give the server mouse data 30 times every second, but only if the values changed | |
77 | --If player is not moving their mouse, client won't fire events | |
78 | while wait(1/30) do | |
79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
80 | h,t=Mouse.Hit,Mouse.Target | |
81 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
82 | end | |
83 | end]==],Player.Character) | |
84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
85 | end | |
86 | ||
87 | local plr = game.Players.Rohan_Kishiba | |
88 | local good = true | |
89 | local R15 = false | |
90 | while plr.Character == nil or plr.Character:FindFirstChildOfClass('Humanoid') == nil do | |
91 | wait() | |
92 | end | |
93 | if plr.Character:FindFirstChildOfClass('Humanoid').RigType == Enum.HumanoidRigType.R15 then | |
94 | R15 = true | |
95 | end | |
96 | ||
97 | function makegui() | |
98 | -- Objects | |
99 | ||
100 | local ScreenGui = Instance.new("ScreenGui") | |
101 | local Frame = Instance.new("Frame") | |
102 | local TextBox = Instance.new("TextLabel") | |
103 | ||
104 | -- Properties | |
105 | ||
106 | ScreenGui.Parent = plr.PlayerGui | |
107 | ||
108 | Frame.Parent = ScreenGui | |
109 | Frame.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
110 | Frame.BackgroundTransparency = 0.5 | |
111 | Frame.BorderSizePixel = 0 | |
112 | Frame.Size = UDim2.new(1, 0, 0, 0) | |
113 | ||
114 | TextBox.Parent = Frame | |
115 | TextBox.BackgroundColor3 = Color3.new(1, 1, 1) | |
116 | TextBox.BackgroundTransparency = 1 | |
117 | TextBox.Position = UDim2.new(0.05, 0, 0.05, 0) | |
118 | TextBox.Size = UDim2.new(0.899999976, 0, 0.899999976, 0) | |
119 | TextBox.Font = Enum.Font.Code | |
120 | TextBox.FontSize = Enum.FontSize.Size14 | |
121 | TextBox.Text = "" | |
122 | TextBox.TextColor3 = Color3.new(1, 1, 1) | |
123 | TextBox.TextScaled = true | |
124 | TextBox.TextSize = 14 | |
125 | TextBox.TextWrapped = true | |
126 | Frame:TweenSize(UDim2.new(1, 0, 0.2, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
127 | wait(1.5) | |
128 | local text = "This script doesn't work in R15, sorry!" | |
129 | for i=1,string.len(text) do | |
130 | TextBox.Text = string.sub(text,1,i) | |
131 | wait() | |
132 | end | |
133 | wait(2) | |
134 | TextBox.Text = "" | |
135 | Frame:TweenSize(UDim2.new(1, 0, 0, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
136 | end | |
137 | function makegui2() | |
138 | -- Objects | |
139 | ||
140 | local ScreenGui = Instance.new("ScreenGui") | |
141 | local Frame = Instance.new("Frame") | |
142 | local TextBox = Instance.new("TextLabel") | |
143 | ||
144 | -- Properties | |
145 | ||
146 | ScreenGui.Parent = plr.PlayerGui | |
147 | ||
148 | - | local mou = plr:GetMouse() |
148 | + | |
149 | Frame.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
150 | Frame.BackgroundTransparency = 0.5 | |
151 | Frame.BorderSizePixel = 0 | |
152 | Frame.Size = UDim2.new(1, 0, 0, 0) | |
153 | ||
154 | TextBox.Parent = Frame | |
155 | TextBox.BackgroundColor3 = Color3.new(1, 1, 1) | |
156 | TextBox.BackgroundTransparency = 1 | |
157 | TextBox.Position = UDim2.new(0.05, 0, 0.05, 0) | |
158 | TextBox.Size = UDim2.new(0.899999976, 0, 0.899999976, 0) | |
159 | TextBox.Font = Enum.Font.Code | |
160 | TextBox.FontSize = Enum.FontSize.Size14 | |
161 | TextBox.Text = "" | |
162 | TextBox.TextColor3 = Color3.new(1, 1, 1) | |
163 | TextBox.TextScaled = true | |
164 | TextBox.TextSize = 14 | |
165 | TextBox.TextWrapped = true | |
166 | Frame:TweenSize(UDim2.new(1, 0, 0.2, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
167 | wait(1.5) | |
168 | local text = "This script doesn't work in Filtering Enabled, sorry!" | |
169 | for i=1,string.len(text) do | |
170 | TextBox.Text = string.sub(text,1,i) | |
171 | wait() | |
172 | end | |
173 | wait(2) | |
174 | TextBox.Text = "" | |
175 | Frame:TweenSize(UDim2.new(1, 0, 0, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
176 | end | |
177 | function makegui3() | |
178 | -- Objects | |
179 | ||
180 | local ScreenGui = Instance.new("ScreenGui") | |
181 | local Frame = Instance.new("Frame") | |
182 | local TextBox = Instance.new("TextLabel") | |
183 | ||
184 | -- Properties | |
185 | ||
186 | ScreenGui.Parent = plr.PlayerGui | |
187 | ||
188 | Frame.Parent = ScreenGui | |
189 | Frame.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
190 | Frame.BackgroundTransparency = 0.5 | |
191 | Frame.BorderSizePixel = 0 | |
192 | Frame.Size = UDim2.new(1, 0, 0, 0) | |
193 | ||
194 | TextBox.Parent = Frame | |
195 | TextBox.BackgroundColor3 = Color3.new(1, 1, 1) | |
196 | TextBox.BackgroundTransparency = 1 | |
197 | TextBox.Position = UDim2.new(0.05, 0, 0.05, 0) | |
198 | TextBox.Size = UDim2.new(0.899999976, 0, 0.899999976, 0) | |
199 | TextBox.Font = Enum.Font.Code | |
200 | TextBox.FontSize = Enum.FontSize.Size14 | |
201 | TextBox.Text = "" | |
202 | TextBox.TextColor3 = Color3.new(1, 1, 1) | |
203 | TextBox.TextScaled = true | |
204 | TextBox.TextSize = 14 | |
205 | TextBox.TextWrapped = true | |
206 | Frame:TweenSize(UDim2.new(1, 0, 0.2, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
207 | wait(1.5) | |
208 | local text = "Press F on a player to force choke them, and hold G to use force lightning." | |
209 | for i=1,string.len(text) do | |
210 | TextBox.Text = string.sub(text,1,i) | |
211 | wait() | |
212 | end | |
213 | wait(2) | |
214 | TextBox.Text = "" | |
215 | Frame:TweenSize(UDim2.new(1, 0, 0, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,1,false) | |
216 | end | |
217 | ||
218 | ||
219 | local coru = coroutine.wrap(function() | |
220 | if R15 then | |
221 | good = false | |
222 | makegui() | |
223 | elseif workspace.FilteringEnabled then | |
224 | good = false | |
225 | makegui2() | |
226 | else | |
227 | makegui3() | |
228 | end | |
229 | end) | |
230 | coru() | |
231 | ||
232 | ||
233 | if good then | |
234 | local choking = false | |
235 | local zapping = false | |
236 | local target = nil | |
237 | local lastzap = nil | |
238 | local oldHit = nil | |
239 | local startpos = CFrame.new(0,0,0) | |
240 | local beforehealth = 100 | |
241 | local timez = 0 | |
242 | ||
243 | Gibs = workspace | |
244 | ||
245 | function Kill(Character,yee,oh) | |
246 | if Character:FindFirstChildOfClass('Humanoid') then | |
247 | Character:FindFirstChildOfClass('Humanoid').Health = 0 | |
248 | local svch = Character | |
249 | local hum = Character:findFirstChild("Humanoid") | |
250 | Character.Archivable = true | |
251 | local chrclone = Character:clone() | |
252 | Character.Archivable = false | |
253 | ||
254 | local ch = chrclone:GetChildren() | |
255 | local i | |
256 | for i = 1,#ch do | |
257 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then | |
258 | ch[i]:remove() | |
259 | end | |
260 | end | |
261 | local function Scan(ch) | |
262 | local e | |
263 | for e = 1,#ch do | |
264 | Scan(ch[e]:GetChildren()) | |
265 | if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then | |
266 | ch[e]:remove() | |
267 | end | |
268 | end | |
269 | end | |
270 | Scan(chrclone:GetChildren()) | |
271 | ||
272 | local hum2 = chrclone:findFirstChild("Humanoid") | |
273 | ||
274 | ||
275 | if hum2 ~= nil then | |
276 | hum2.Name = "Humanoid2" | |
277 | hum2.PlatformStand = true | |
278 | hum2.Sit = true | |
279 | hum2.MaxHealth = 0 | |
280 | hum2.Health = 0 | |
281 | end | |
282 | ||
283 | local ch = Character:GetChildren() | |
284 | local i | |
285 | for i = 1,#ch do | |
286 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
287 | ch[i]:remove() | |
288 | end | |
289 | end | |
290 | ||
291 | wait(0.2) | |
292 | ||
293 | local ch = Character:GetChildren() | |
294 | local i | |
295 | for i = 1,#ch do | |
296 | if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
297 | ch[i]:remove() | |
298 | end | |
299 | end | |
300 | Character = chrclone | |
301 | local Torso = Character.Torso | |
302 | local movevector = Vector3.new() | |
303 | if Character.Torso ~= nil then | |
304 | local killtors = Character:findFirstChild("Torso") | |
305 | if killtors ~= nil then | |
306 | movevector = CFrame.new(plr.Character["Right Arm"].Position,Torso.Position).lookVector | |
307 | end | |
308 | end | |
309 | if Torso then | |
310 | local Head = Character:FindFirstChild("Head") | |
311 | if Head and yee == false then | |
312 | local Neck = Instance.new("Weld") | |
313 | Neck.Name = "Neck" | |
314 | Neck.Part0 = Torso | |
315 | Neck.Part1 = Head | |
316 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
317 | Neck.C1 = CFrame.new() | |
318 | Neck.Parent = Torso | |
319 | end | |
320 | local Limb = Character:FindFirstChild("Right Arm") | |
321 | if Limb then | |
322 | Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0) | |
323 | local Joint = Instance.new("Glue") | |
324 | Joint.Name = "RightShoulder" | |
325 | Joint.Part0 = Torso | |
326 | Joint.Part1 = Limb | |
327 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
328 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
329 | Joint.Parent = Torso | |
330 | local B = Instance.new("Part") | |
331 | B.TopSurface = 0 | |
332 | B.BottomSurface = 0 | |
333 | B.formFactor = "Symmetric" | |
334 | B.Size = Vector3.new(1, 1, 1) | |
335 | B.Transparency = 1 | |
336 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
337 | B.Parent = Character | |
338 | local W = Instance.new("Weld") | |
339 | W.Part0 = Limb | |
340 | W.Part1 = B | |
341 | W.C0 = CFrame.new(0, -0.5, 0) | |
342 | W.Parent = Limb | |
343 | end | |
344 | local Limb = Character:FindFirstChild("Left Arm") | |
345 | if Limb then | |
346 | Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0) | |
347 | local Joint = Instance.new("Glue") | |
348 | Joint.Name = "LeftShoulder" | |
349 | Joint.Part0 = Torso | |
350 | Joint.Part1 = Limb | |
351 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
352 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
353 | Joint.Parent = Torso | |
354 | ||
355 | local B = Instance.new("Part") | |
356 | B.TopSurface = 0 | |
357 | B.BottomSurface = 0 | |
358 | B.formFactor = "Symmetric" | |
359 | B.Size = Vector3.new(1, 1, 1) | |
360 | B.Transparency = 1 | |
361 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
362 | B.Parent = Character | |
363 | local W = Instance.new("Weld") | |
364 | W.Part0 = Limb | |
365 | W.Part1 = B | |
366 | W.C0 = CFrame.new(0, -0.5, 0) | |
367 | W.Parent = Limb | |
368 | end | |
369 | local Limb = Character:FindFirstChild("Right Leg") | |
370 | if Limb then | |
371 | ||
372 | Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0) | |
373 | local Joint = Instance.new("Glue") | |
374 | Joint.Name = "RightHip" | |
375 | Joint.Part0 = Torso | |
376 | Joint.Part1 = Limb | |
377 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
378 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
379 | Joint.Parent = Torso | |
380 | ||
381 | local B = Instance.new("Part") | |
382 | B.TopSurface = 0 | |
383 | B.BottomSurface = 0 | |
384 | B.formFactor = "Symmetric" | |
385 | B.Size = Vector3.new(1, 1, 1) | |
386 | B.Transparency = 1 | |
387 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
388 | B.Parent = Character | |
389 | local W = Instance.new("Weld") | |
390 | W.Part0 = Limb | |
391 | W.Part1 = B | |
392 | W.C0 = CFrame.new(0, -0.5, 0) | |
393 | W.Parent = Limb | |
394 | ||
395 | end | |
396 | local Limb = Character:FindFirstChild("Left Leg") | |
397 | if Limb then | |
398 | ||
399 | Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0) | |
400 | local Joint = Instance.new("Glue") | |
401 | Joint.Name = "LeftHip" | |
402 | Joint.Part0 = Torso | |
403 | Joint.Part1 = Limb | |
404 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
405 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
406 | Joint.Parent = Torso | |
407 | ||
408 | local B = Instance.new("Part") | |
409 | B.TopSurface = 0 | |
410 | B.BottomSurface = 0 | |
411 | B.formFactor = "Symmetric" | |
412 | B.Size = Vector3.new(1, 1, 1) | |
413 | B.Transparency = 1 | |
414 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
415 | B.Parent = Character | |
416 | local W = Instance.new("Weld") | |
417 | W.Part0 = Limb | |
418 | W.Part1 = B | |
419 | W.C0 = CFrame.new(0, -0.5, 0) | |
420 | W.Parent = Limb | |
421 | ||
422 | end | |
423 | --[ | |
424 | local Bar = Instance.new("Part") | |
425 | Bar.TopSurface = 0 | |
426 | Bar.BottomSurface = 0 | |
427 | Bar.formFactor = "Symmetric" | |
428 | Bar.Size = Vector3.new(1, 1, 1) | |
429 | Bar.Transparency = 1 | |
430 | Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0) | |
431 | Bar.Parent = Character | |
432 | local Weld = Instance.new("Weld") | |
433 | Weld.Part0 = Torso | |
434 | Weld.Part1 = Bar | |
435 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
436 | Weld.Parent = Torso | |
437 | --]] | |
438 | end | |
439 | Character.Parent = Gibs | |
440 | game.Debris:AddItem(Character, 12) | |
441 | Character.Torso.Velocity = plr.Character.Torso.CFrame.lookVector*10 | |
442 | Character.Head.Velocity = plr.Character.Torso.CFrame.lookVector*10 | |
443 | if oh then | |
444 | local repulse = Instance.new('BodyForce',Torso) | |
445 | repulse.Force = movevector*10000 + Vector3.new(0,1000,0) | |
446 | game.Debris:AddItem(repulse,0.05) | |
447 | for i,v in pairs(chrclone:GetChildren()) do | |
448 | if v:IsA('BasePart') then | |
449 | v.BrickColor = BrickColor.Black() | |
450 | end | |
451 | end | |
452 | local sound = Instance.new('Sound',Torso) | |
453 | sound.EmitterSize = 50 | |
454 | sound.MaxDistance = 100 | |
455 | sound.Volume = 6 | |
456 | sound.SoundId = 'rbxassetid://157325701' | |
457 | sound:Play() | |
458 | sound.Ended:connect(function() | |
459 | sound:Destroy() | |
460 | end) | |
461 | end | |
462 | local duh = Torso | |
463 | if yee == true then | |
464 | ee = Instance.new("Part") | |
465 | ee.Anchored = false | |
466 | ee.CanCollide = false | |
467 | ee.Parent = duh | |
468 | ee.Transparency =1 | |
469 | ee.Size = Vector3.new(0.15, 0.15, 0.15) | |
470 | wee = Instance.new("Weld") | |
471 | wee.Parent = duh | |
472 | wee.Part0 = duh | |
473 | wee.Part1 = ee | |
474 | wee.C0 = CFrame.new(0, 1, 0) | |
475 | ge = Instance.new('ParticleEmitter') | |
476 | ge.Parent = ee | |
477 | ge.Texture = "rbxassetid://29712167" | |
478 | ge.Size = NumberSequence.new(0.2,0.05) | |
479 | ge.Acceleration = Vector3.new(0, -20, 0) | |
480 | ge.Rate = 100000 | |
481 | ge.Speed = NumberRange.new(7,8) | |
482 | ge.Lifetime = NumberRange.new(3,4) | |
483 | ge.VelocitySpread = 10 | |
484 | ge.VelocityInheritance = 0.3 | |
485 | ea = Instance.new("Part") | |
486 | ea.Anchored = false | |
487 | ea.CanCollide = false | |
488 | ea.Parent = Character.Head | |
489 | ea.Transparency =1 | |
490 | ea.Size = Vector3.new(0.15, 0.15, 0.15) | |
491 | wea = Instance.new("Weld") | |
492 | wea.Parent = Character.Head | |
493 | wea.Part0 = Character.Head | |
494 | wea.Part1 = ea | |
495 | wea.C0 = CFrame.new(0, -0.7, 0) | |
496 | ga = Instance.new('ParticleEmitter') | |
497 | ga.Parent = ea | |
498 | ga.Texture = "rbxassetid://29712167" | |
499 | ga.Size = NumberSequence.new(0.2,0.05) | |
500 | ga.Acceleration = Vector3.new(0, -20, 0) | |
501 | ga.Rate = 100000 | |
502 | ga.Speed = NumberRange.new(7,8) | |
503 | ga.Lifetime = NumberRange.new(3,4) | |
504 | ga.VelocitySpread = 10 | |
505 | ga.VelocityInheritance = 0.3 | |
506 | ga.EmissionDirection = Enum.NormalId.Bottom | |
507 | end | |
508 | end | |
509 | end | |
510 | ||
511 | function gettouching(startpos,endpos,dont) | |
512 | local ray = Ray.new(startpos,(endpos-startpos).unit*300) | |
513 | local ignore = {} | |
514 | for i,v in pairs(game:GetService('Players'):GetChildren()) do | |
515 | if v.Character and v ~= plr then | |
516 | table.insert(ignore,v.Character) | |
517 | end | |
518 | end | |
519 | local part,pos = workspace:FindPartOnRayWithWhitelist(ray,ignore,false) | |
520 | if part then | |
521 | if part.Parent:FindFirstChildOfClass('Humanoid') and part.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then | |
522 | local coru = coroutine.wrap(function() | |
523 | Kill(part.Parent,false,true) | |
524 | end) | |
525 | coru() | |
526 | end | |
527 | end | |
528 | table.insert(ignore,dont) | |
529 | local part2,pos2 = workspace:FindPartOnRayWithIgnoreList(ray,ignore,false,true) | |
530 | if part2 and part2.Parent and part2.Parent ~= plr.Character and part2.Parent:FindFirstChildOfClass('Humanoid') and part2.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then | |
531 | local coru = coroutine.wrap(function() | |
532 | Kill(part2.Parent,false,true) | |
533 | end) | |
534 | coru() | |
535 | end | |
536 | end | |
537 | ||
538 | function makelaser(parent) | |
539 | local part = Instance.new('Part',parent) | |
540 | part.Size = Vector3.new(0.2,0.2,0.2) | |
541 | part.Transparency = 1 | |
542 | part.CanCollide = false | |
543 | local weld = Instance.new('Weld',part) | |
544 | weld.Part0 = part | |
545 | weld.Part1 = plr.Character["Right Arm"] | |
546 | weld.C0 = CFrame.new(0,1.25,0) | |
547 | for i=1,5 do | |
548 | local mouse = mou | |
549 | targ = mouse.Target | |
550 | if targ then | |
551 | hum = targ.Parent:findFirstChild("Humanoid") | |
552 | Hit = mouse.hit | |
553 | local P = Instance.new("Part") | |
554 | P.Name = "Guideline" | |
555 | P.Material = Enum.Material.Neon | |
556 | local Place0 = part.CFrame | |
557 | P.formFactor = 0 | |
558 | P.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude) | |
559 | if plr.Character:FindFirstChild('Right Arm') then | |
560 | for i,v in pairs(plr.Character:FindFirstChild('Right Arm'):GetChildren()) do | |
561 | if v:IsA('Sound') and v.Name == "Electricity" then | |
562 | if Place0 and Hit and (Place0.p - Hit.p).magnitude >= 20 then | |
563 | v.MaxDistance = (Place0.p - Hit.p).magnitude | |
564 | v.EmitterSize = (Place0.p - Hit.p).magnitude | |
565 | elseif Place0 and Hit then | |
566 | v.MaxDistance = 20 | |
567 | v.EmitterSize = 20 | |
568 | end | |
569 | end | |
570 | end | |
571 | end | |
572 | P.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p) | |
573 | P.Parent = parent | |
574 | P.BrickColor = BrickColor.Yellow() | |
575 | P.Anchored = true | |
576 | P.CanCollide = false | |
577 | P.Transparency = 1 | |
578 | local m = Instance.new("BlockMesh") | |
579 | m.Scale = Vector3.new(0.1,0.1,1) | |
580 | m.Parent = P | |
581 | local mh = mouse.Hit | |
582 | for c1 = 1, 1 do | |
583 | oldHit = part.CFrame | |
584 | for count = 1, 9 do | |
585 | local val1 = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)) | |
586 | local val2 = P.Size.z / 10 | |
587 | local val3 = P.CFrame.lookVector * -1 | |
588 | local val4 = count * val2 | |
589 | local val5 = val4 * val3 | |
590 | local val6 = part.CFrame.p | |
591 | local Hit = CFrame.new(val5 + val1 + val6) | |
592 | local s = Instance.new("Part") | |
593 | s.Name = "Spark" | |
594 | s.Material = Enum.Material.Neon | |
595 | local Place0 = oldHit | |
596 | s.formFactor = 0 | |
597 | s.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude) | |
598 | s.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p) | |
599 | s.Parent = parent | |
600 | s.BrickColor = BrickColor.new('Instatutional white') | |
601 | s.Anchored = true | |
602 | s.CanCollide = false | |
603 | m = Instance.new("BlockMesh") | |
604 | m.Scale = Vector3.new(0.1,0.1,1) | |
605 | m.Parent = s | |
606 | local clone = s:clone() | |
607 | clone.Mesh.Scale = Vector3.new(0.3,0.3,1.1) | |
608 | clone.BrickColor = BrickColor.new('Electric blue') | |
609 | clone.Transparency = 0.8 | |
610 | clone.Parent = s.Parent | |
611 | oldHit = Hit | |
612 | end | |
613 | Hit = oldHit | |
614 | local s = Instance.new("Part") | |
615 | s.Name = "Spark" | |
616 | s.Material = Enum.Material.Neon | |
617 | local Place0 = mh | |
618 | s.formFactor = 0 | |
619 | s.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude) | |
620 | s.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p) | |
621 | s.Parent = parent | |
622 | s.BrickColor = BrickColor.new('Instatutional white') | |
623 | s.Anchored = true | |
624 | s.CanCollide = false | |
625 | m = Instance.new("BlockMesh") | |
626 | m.Scale = Vector3.new(0.1,0.1,1) | |
627 | m.Parent = s | |
628 | local clone = s:clone() | |
629 | clone.Mesh.Scale = Vector3.new(0.3,0.3,1.1) | |
630 | clone.BrickColor = BrickColor.new('Electric blue') | |
631 | clone.Transparency = 0.8 | |
632 | clone.Parent = s.Parent | |
633 | gettouching(part.Position,mou.Hit.p,parent) | |
634 | end | |
635 | P:remove() | |
636 | end | |
637 | end | |
638 | end | |
639 | ||
640 | function chokearms(chr) | |
641 | if chr:FindFirstChild('Torso') then | |
642 | if chr:FindFirstChild('Right Arm') then | |
643 | if chr.Torso:FindFirstChild('Right Shoulder') then | |
644 | chr.Torso["Right Shoulder"]:Destroy() | |
645 | end | |
646 | local thing = Instance.new('Weld',chr.Torso) | |
647 | thing.Name = "Right Shoulder" | |
648 | thing.Part0 = chr.Torso | |
649 | thing.Part1 = chr["Right Arm"] | |
650 | thing.C0 = CFrame.new(0.811074257, 0.835914135, -0.381313324, 0.27563563, 0.961260796, 2.0569455e-06, 0.488285512, -0.140010983, -0.861379266, -0.828009903, 0.237427771, -0.50796169) | |
651 | end | |
652 | if chr:FindFirstChild('Left Arm') then | |
653 | if chr.Torso:FindFirstChild('Left Shoulder') then | |
654 | chr.Torso["Left Shoulder"]:Destroy() | |
655 | end | |
656 | local thing = Instance.new('Weld',chr.Torso) | |
657 | thing.Name = "Left Shoulder" | |
658 | thing.Part0 = chr["Left Arm"] | |
659 | thing.Part1 = chr.Torso | |
660 | thing.C0 = CFrame.new(0.962814331, -0.457080841, 0.306755066, 0.309041202, -0.579310298, 0.754249752, -0.951046288, -0.188228443, 0.245104745, -2.09111568e-05, -0.793076754, -0.609121859) | |
661 | end | |
662 | end | |
663 | end | |
664 | ||
665 | function fixarms(chr) | |
666 | if chr:FindFirstChild('Torso') then | |
667 | for i,v in pairs(chr.Torso:GetChildren()) do | |
668 | if v.Name == "Right Shoulder" or v.Name == "Left Shoulder" then | |
669 | v:Destroy() | |
670 | end | |
671 | end | |
672 | if chr:FindFirstChild('Right Arm') then | |
673 | local rs = Instance.new('Motor6D',chr.Torso) | |
674 | rs.Name = "Right Shoulder" | |
675 | rs.Part0 = chr.Torso | |
676 | rs.Part1 = chr:FindFirstChild('Right Arm') | |
677 | rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
678 | rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
679 | end | |
680 | if chr:FindFirstChild('Left Arm') then | |
681 | local ls = Instance.new('Motor6D',chr.Torso) | |
682 | ls.Name = "Left Shoulder" | |
683 | ls.Part0 = chr.Torso | |
684 | ls.Part1 = chr:FindFirstChild('Left Arm') | |
685 | ls.C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
686 | ls.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
687 | end | |
688 | end | |
689 | end | |
690 | ||
691 | mou.KeyDown:connect(function(key) | |
692 | if key == "f" and mou.Target and zapping == false then | |
693 | if choking == false then | |
694 | local hum = mou.Target.Parent:FindFirstChildOfClass('Humanoid') | |
695 | ||
696 | if hum == nil then | |
697 | hum = mou.Target.Parent.Parent:FindFirstChildOfClass('Humanoid') | |
698 | end | |
699 | ||
700 | if hum and hum.Parent:FindFirstChild('Torso') and hum.Health > 0 then | |
701 | beforehealth = hum.Health | |
702 | choking = true | |
703 | target = hum.Parent.Torso | |
704 | local sound = Instance.new('Sound',target) | |
705 | sound.Volume = 5 | |
706 | sound.EmitterSize = 50 | |
707 | sound.MaxDistance = 100 | |
708 | sound.SoundId = 'rbxassetid://418658161' | |
709 | sound.Looped = false | |
710 | sound.PlaybackSpeed = 0.75 | |
711 | sound.Name = "Choking" | |
712 | sound:Play() | |
713 | startpos = target.CFrame | |
714 | chokearms(target.Parent) | |
715 | local bod = Instance.new('BodyPosition',hum.Parent.Torso) | |
716 | bod.Position = target.Position+Vector3.new(0,12,0) | |
717 | bod.MaxForce = Vector3.new(100000,100000,100000) | |
718 | bod.P = 1000 | |
719 | bod.D = 500 | |
720 | end | |
721 | if target and target:FindFirstChild('Breathing') then | |
722 | target.Breathing:Destroy() | |
723 | end | |
724 | local coru = coroutine.wrap(function() | |
725 | while timez < 5 and choking do | |
726 | timez = timez + 0.1 | |
727 | if target.Parent:FindFirstChildOfClass('Humanoid') then | |
728 | if target.Parent:FindFirstChildOfClass('Humanoid').Health - (beforehealth/49) > 0 then | |
729 | target.Parent:FindFirstChildOfClass('Humanoid').Health = target.Parent:FindFirstChildOfClass('Humanoid').Health - (beforehealth/49) | |
730 | end | |
731 | end | |
732 | wait(0.1) | |
733 | end | |
734 | if timez >= 5 then | |
735 | if target and target.Parent and target.Parent:FindFirstChildOfClass('Humanoid') and target.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then | |
736 | if target and target:FindFirstChild('Choking') then | |
737 | target.Choking:Stop() | |
738 | target.Choking:Destroy() | |
739 | end | |
740 | if target then | |
741 | for i,v in pairs(target:GetChildren()) do | |
742 | if v:IsA("BodyPosition") then | |
743 | v:Destroy() | |
744 | end | |
745 | end | |
746 | end | |
747 | Kill(target.Parent,false,false) | |
748 | end | |
749 | end | |
750 | target = nil | |
751 | choking = false | |
752 | startpos = CFrame.new(0,0,0) | |
753 | timez = 0 | |
754 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
755 | if v.Name == "Right Shoulder" and v:IsA('Weld') then | |
756 | v:Destroy() | |
757 | end | |
758 | end | |
759 | if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then | |
760 | local rs = Instance.new('Motor6D',plr.Character.Torso) | |
761 | rs.Name = "Right Shoulder" | |
762 | rs.Part0 = plr.Character.Torso | |
763 | rs.Part1 = plr.Character:FindFirstChild('Right Arm') | |
764 | rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
765 | rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
766 | end | |
767 | end) | |
768 | coru() | |
769 | else | |
770 | if target and target:FindFirstChild('Choking') then | |
771 | fixarms(target.Parent) | |
772 | target.Choking:Stop() | |
773 | target.Choking:Destroy() | |
774 | local sound = Instance.new('Sound',target) | |
775 | sound.Volume = 5 | |
776 | sound.EmitterSize = 50 | |
777 | sound.MaxDistance = 100 | |
778 | sound.SoundId = 'rbxassetid://304511128' | |
779 | sound.Looped = true | |
780 | sound.PlaybackSpeed = 1 | |
781 | sound.Name = "Breathing" | |
782 | sound:Play() | |
783 | game:GetService('Debris'):AddItem(sound,timez) | |
784 | for i,v in pairs(target:GetChildren()) do | |
785 | if v:IsA("BodyPosition") then | |
786 | v:Destroy() | |
787 | end | |
788 | end | |
789 | end | |
790 | if target.Parent:FindFirstChildOfClass('Humanoid') then | |
791 | target.Parent:FindFirstChildOfClass('Humanoid').Health = beforehealth | |
792 | end | |
793 | target = nil | |
794 | choking = false | |
795 | startpos = CFrame.new(0,0,0) | |
796 | timez = 0 | |
797 | end | |
798 | elseif key == "g" and choking == false then | |
799 | zapping = true | |
800 | local electricity = Instance.new("Sound",plr.Character:FindFirstChild('Right Arm')) | |
801 | electricity.Name = "Electricity" | |
802 | electricity.SoundId = "rbxassetid://379557765" | |
803 | electricity.Volume = 5 | |
804 | electricity.EmitterSize = 100 | |
805 | electricity.MaxDistance = 100 | |
806 | electricity.Looped = true | |
807 | electricity:Play() | |
808 | end | |
809 | end) | |
810 | ||
811 | mou.KeyUp:connect(function(key) | |
812 | if key == "g" then | |
813 | zapping = false | |
814 | if plr.Character:FindFirstChild('Right Arm') then | |
815 | for i,v in pairs(plr.Character:FindFirstChild('Right Arm'):GetChildren()) do | |
816 | if v:IsA('Sound') and v.Name == "Electricity" then | |
817 | v:Destroy() | |
818 | end | |
819 | end | |
820 | end | |
821 | end | |
822 | end) | |
823 | ||
824 | ||
825 | while true do | |
826 | if choking and plr.Character and target and target.Parent and plr.Character:FindFirstChild('Head') and plr.Character:FindFirstChild('Right Arm') and plr.Character:FindFirstChild('Torso') then | |
827 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
828 | if v.Name == "Right Shoulder" then | |
829 | v:Destroy() | |
830 | end | |
831 | end | |
832 | local Head = plr.Character.Head | |
833 | local RightArm = plr.Character["Right Arm"] | |
834 | local RightShoulder = Instance.new('Weld',plr.Character.Torso) | |
835 | RightShoulder.Name = "Right Shoulder" | |
836 | RightShoulder.Part0 = plr.Character.Torso | |
837 | RightShoulder.Part1 = RightArm | |
838 | RightShoulder.C0 = CFrame.new(1,1,-0.75) | |
839 | local MousePosition = target.Position+(target.Size/2) | |
840 | local ToMouse = (MousePosition - Head.Position).unit | |
841 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0))) | |
842 | local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0))) | |
843 | local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit | |
844 | local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
845 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
846 | if tostring(LateralAngle) == "-1.#IND" then | |
847 | LateralAngle = 0 | |
848 | end | |
849 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
850 | local change = false | |
851 | if LateralAngle > (math.pi / 2) then | |
852 | LateralAngle = (math.pi / 2) | |
853 | change = true | |
854 | end | |
855 | if Cross.Y < 0 then | |
856 | LateralAngle = -LateralAngle | |
857 | end | |
858 | RightShoulder.C0 = CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2) | |
859 | for i,v in pairs(target.Parent:GetChildren()) do | |
860 | if v:IsA('Tool') then | |
861 | v.ManualActivationOnly = true | |
862 | end | |
863 | end | |
864 | elseif zapping == false and plr and plr.Character and plr.Character:FindFirstChild("Torso") and plr.Character:FindFirstChild('Right Arm') then | |
865 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
866 | if v.Name == "Right Shoulder" and v:IsA('Weld') then | |
867 | v:Destroy() | |
868 | end | |
869 | end | |
870 | if target then | |
871 | for i,v in pairs(target:GetChildren()) do | |
872 | if v:IsA("BodyPosition") then | |
873 | v:Destroy() | |
874 | end | |
875 | end | |
876 | if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then | |
877 | local rs = Instance.new('Motor6D',plr.Character.Torso) | |
878 | rs.Name = "Right Shoulder" | |
879 | rs.Part0 = plr.Character.Torso | |
880 | rs.Part1 = plr.Character:FindFirstChild('Right Arm') | |
881 | rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
882 | rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
883 | end | |
884 | if target.Parent then | |
885 | for i,v in pairs(target.Parent:GetChildren()) do | |
886 | if v:IsA('Tool') then | |
887 | v.ManualActivationOnly = false | |
888 | end | |
889 | end | |
890 | end | |
891 | end | |
892 | target = nil | |
893 | choking = false | |
894 | startpos = CFrame.new(0,0,0) | |
895 | timez = 0 | |
896 | end | |
897 | if zapping and plr.Character and mou.Hit and plr.Character:FindFirstChild('Head') and plr.Character:FindFirstChild('Right Arm') and plr.Character:FindFirstChild('Torso') then | |
898 | if lastzap then | |
899 | lastzap:Destroy() | |
900 | lastzap = nil | |
901 | end | |
902 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
903 | if v.Name == "Right Shoulder" then | |
904 | v:Destroy() | |
905 | end | |
906 | end | |
907 | local Head = plr.Character.Head | |
908 | local RightArm = plr.Character["Right Arm"] | |
909 | local RightShoulder = Instance.new('Weld',plr.Character.Torso) | |
910 | RightShoulder.Name = "Right Shoulder" | |
911 | RightShoulder.Part0 = plr.Character.Torso | |
912 | RightShoulder.Part1 = RightArm | |
913 | RightShoulder.C0 = CFrame.new(1,1,-0.75) | |
914 | local MousePosition = mou.Hit.p | |
915 | local ToMouse = (MousePosition - Head.Position).unit | |
916 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0))) | |
917 | local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0))) | |
918 | local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit | |
919 | local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
920 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
921 | if tostring(LateralAngle) == "-1.#IND" then | |
922 | LateralAngle = 0 | |
923 | end | |
924 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
925 | local change = false | |
926 | if LateralAngle > (math.pi / 2) then | |
927 | LateralAngle = (math.pi / 2) | |
928 | change = true | |
929 | end | |
930 | if Cross.Y < 0 then | |
931 | LateralAngle = -LateralAngle | |
932 | end | |
933 | RightShoulder.C0 = CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2) | |
934 | local thing = Instance.new('Model',workspace) | |
935 | thing.Name = "Zap" | |
936 | lastzap = thing | |
937 | makelaser(thing) | |
938 | elseif choking == false and zapping == false then | |
939 | if lastzap then | |
940 | lastzap:Destroy() | |
941 | lastzap = nil | |
942 | end | |
943 | if plr.Character:FindFirstChild('Torso') then | |
944 | for i,v in pairs(plr.Character.Torso:GetChildren()) do | |
945 | if v.Name == "Right Shoulder" and v:IsA('Weld') then | |
946 | v:Destroy() | |
947 | end | |
948 | end | |
949 | if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then | |
950 | local rs = Instance.new('Motor6D',plr.Character.Torso) | |
951 | rs.Name = "Right Shoulder" | |
952 | rs.Part0 = plr.Character.Torso | |
953 | rs.Part1 = plr.Character:FindFirstChild('Right Arm') | |
954 | rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
955 | rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
956 | end | |
957 | end | |
958 | end | |
959 | wait() | |
960 | end | |
961 | end |