Advertisement
EdgyHedgehog

Force Choke

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