Maykelrosabal

aa

Oct 2nd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.70 KB | None | 0 0
  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").LocalPlayer
  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 = owner
  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. Frame.Parent = ScreenGui
  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 mou = plr:GetMouse()
  235. local choking = false
  236. local zapping = false
  237. local target = nil
  238. local lastzap = nil
  239. local oldHit = nil
  240. local startpos = CFrame.new(0,0,0)
  241. local beforehealth = 100
  242. local timez = 0
  243.  
  244. Gibs = workspace
  245.  
  246. function Kill(Character,yee,oh)
  247. if Character:FindFirstChildOfClass('Humanoid') then
  248. Character:FindFirstChildOfClass('Humanoid').Health = 0
  249. local svch = Character
  250. local hum = Character:findFirstChild("Humanoid")
  251. Character.Archivable = true
  252. local chrclone = Character:clone()
  253. Character.Archivable = false
  254.  
  255. local ch = chrclone:GetChildren()
  256. local i
  257. for i = 1,#ch do
  258. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
  259. ch[i]:remove()
  260. end
  261. end
  262. local function Scan(ch)
  263. local e
  264. for e = 1,#ch do
  265. Scan(ch[e]:GetChildren())
  266. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  267. ch[e]:remove()
  268. end
  269. end
  270. end
  271. Scan(chrclone:GetChildren())
  272.  
  273. local hum2 = chrclone:findFirstChild("Humanoid")
  274.  
  275.  
  276. if hum2 ~= nil then
  277. hum2.Name = "Humanoid2"
  278. hum2.PlatformStand = true
  279. hum2.Sit = true
  280. hum2.MaxHealth = 0
  281. hum2.Health = 0
  282. end
  283.  
  284. local ch = Character:GetChildren()
  285. local i
  286. for i = 1,#ch do
  287. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  288. ch[i]:remove()
  289. end
  290. end
  291.  
  292. wait(0.2)
  293.  
  294. local ch = Character:GetChildren()
  295. local i
  296. for i = 1,#ch do
  297. if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  298. ch[i]:remove()
  299. end
  300. end
  301. Character = chrclone
  302. local Torso = Character.Torso
  303. local movevector = Vector3.new()
  304. if Character.Torso ~= nil then
  305. local killtors = Character:findFirstChild("Torso")
  306. if killtors ~= nil then
  307. movevector = CFrame.new(plr.Character["Right Arm"].Position,Torso.Position).lookVector
  308. end
  309. end
  310. if Torso then
  311. local Head = Character:FindFirstChild("Head")
  312. if Head and yee == false then
  313. local Neck = Instance.new("Weld")
  314. Neck.Name = "Neck"
  315. Neck.Part0 = Torso
  316. Neck.Part1 = Head
  317. Neck.C0 = CFrame.new(0, 1.5, 0)
  318. Neck.C1 = CFrame.new()
  319. Neck.Parent = Torso
  320. end
  321. local Limb = Character:FindFirstChild("Right Arm")
  322. if Limb then
  323. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  324. local Joint = Instance.new("Glue")
  325. Joint.Name = "RightShoulder"
  326. Joint.Part0 = Torso
  327. Joint.Part1 = Limb
  328. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  329. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  330. Joint.Parent = Torso
  331. local B = Instance.new("Part")
  332. B.TopSurface = 0
  333. B.BottomSurface = 0
  334. B.formFactor = "Symmetric"
  335. B.Size = Vector3.new(1, 1, 1)
  336. B.Transparency = 1
  337. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  338. B.Parent = Character
  339. local W = Instance.new("Weld")
  340. W.Part0 = Limb
  341. W.Part1 = B
  342. W.C0 = CFrame.new(0, -0.5, 0)
  343. W.Parent = Limb
  344. end
  345. local Limb = Character:FindFirstChild("Left Arm")
  346. if Limb then
  347. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  348. local Joint = Instance.new("Glue")
  349. Joint.Name = "LeftShoulder"
  350. Joint.Part0 = Torso
  351. Joint.Part1 = Limb
  352. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  353. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  354. Joint.Parent = Torso
  355.  
  356. local B = Instance.new("Part")
  357. B.TopSurface = 0
  358. B.BottomSurface = 0
  359. B.formFactor = "Symmetric"
  360. B.Size = Vector3.new(1, 1, 1)
  361. B.Transparency = 1
  362. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  363. B.Parent = Character
  364. local W = Instance.new("Weld")
  365. W.Part0 = Limb
  366. W.Part1 = B
  367. W.C0 = CFrame.new(0, -0.5, 0)
  368. W.Parent = Limb
  369. end
  370. local Limb = Character:FindFirstChild("Right Leg")
  371. if Limb then
  372.  
  373. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  374. local Joint = Instance.new("Glue")
  375. Joint.Name = "RightHip"
  376. Joint.Part0 = Torso
  377. Joint.Part1 = Limb
  378. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  379. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  380. Joint.Parent = Torso
  381.  
  382. local B = Instance.new("Part")
  383. B.TopSurface = 0
  384. B.BottomSurface = 0
  385. B.formFactor = "Symmetric"
  386. B.Size = Vector3.new(1, 1, 1)
  387. B.Transparency = 1
  388. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  389. B.Parent = Character
  390. local W = Instance.new("Weld")
  391. W.Part0 = Limb
  392. W.Part1 = B
  393. W.C0 = CFrame.new(0, -0.5, 0)
  394. W.Parent = Limb
  395.  
  396. end
  397. local Limb = Character:FindFirstChild("Left Leg")
  398. if Limb then
  399.  
  400. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  401. local Joint = Instance.new("Glue")
  402. Joint.Name = "LeftHip"
  403. Joint.Part0 = Torso
  404. Joint.Part1 = Limb
  405. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  406. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  407. Joint.Parent = Torso
  408.  
  409. local B = Instance.new("Part")
  410. B.TopSurface = 0
  411. B.BottomSurface = 0
  412. B.formFactor = "Symmetric"
  413. B.Size = Vector3.new(1, 1, 1)
  414. B.Transparency = 1
  415. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  416. B.Parent = Character
  417. local W = Instance.new("Weld")
  418. W.Part0 = Limb
  419. W.Part1 = B
  420. W.C0 = CFrame.new(0, -0.5, 0)
  421. W.Parent = Limb
  422.  
  423. end
  424. --[
  425. local Bar = Instance.new("Part")
  426. Bar.TopSurface = 0
  427. Bar.BottomSurface = 0
  428. Bar.formFactor = "Symmetric"
  429. Bar.Size = Vector3.new(1, 1, 1)
  430. Bar.Transparency = 1
  431. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  432. Bar.Parent = Character
  433. local Weld = Instance.new("Weld")
  434. Weld.Part0 = Torso
  435. Weld.Part1 = Bar
  436. Weld.C0 = CFrame.new(0, 0.5, 0)
  437. Weld.Parent = Torso
  438. --]]
  439. end
  440. Character.Parent = Gibs
  441. game.Debris:AddItem(Character, 12)
  442. Character.Torso.Velocity = plr.Character.Torso.CFrame.lookVector*10
  443. Character.Head.Velocity = plr.Character.Torso.CFrame.lookVector*10
  444. if oh then
  445. local repulse = Instance.new('BodyForce',Torso)
  446. repulse.Force = movevector*10000 + Vector3.new(0,1000,0)
  447. game.Debris:AddItem(repulse,0.05)
  448. for i,v in pairs(chrclone:GetChildren()) do
  449. if v:IsA('BasePart') then
  450. v.BrickColor = BrickColor.Black()
  451. end
  452. end
  453. local sound = Instance.new('Sound',Torso)
  454. sound.EmitterSize = 50
  455. sound.MaxDistance = 100
  456. sound.Volume = 6
  457. sound.SoundId = 'rbxassetid://157325701'
  458. sound:Play()
  459. sound.Ended:connect(function()
  460. sound:Destroy()
  461. end)
  462. end
  463. local duh = Torso
  464. if yee == true then
  465. ee = Instance.new("Part")
  466. ee.Anchored = false
  467. ee.CanCollide = false
  468. ee.Parent = duh
  469. ee.Transparency =1
  470. ee.Size = Vector3.new(0.15, 0.15, 0.15)
  471. wee = Instance.new("Weld")
  472. wee.Parent = duh
  473. wee.Part0 = duh
  474. wee.Part1 = ee
  475. wee.C0 = CFrame.new(0, 1, 0)
  476. ge = Instance.new('ParticleEmitter')
  477. ge.Parent = ee
  478. ge.Texture = "rbxassetid://29712167"
  479. ge.Size = NumberSequence.new(0.2,0.05)
  480. ge.Acceleration = Vector3.new(0, -20, 0)
  481. ge.Rate = 100000
  482. ge.Speed = NumberRange.new(7,8)
  483. ge.Lifetime = NumberRange.new(3,4)
  484. ge.VelocitySpread = 10
  485. ge.VelocityInheritance = 0.3
  486. ea = Instance.new("Part")
  487. ea.Anchored = false
  488. ea.CanCollide = false
  489. ea.Parent = Character.Head
  490. ea.Transparency =1
  491. ea.Size = Vector3.new(0.15, 0.15, 0.15)
  492. wea = Instance.new("Weld")
  493. wea.Parent = Character.Head
  494. wea.Part0 = Character.Head
  495. wea.Part1 = ea
  496. wea.C0 = CFrame.new(0, -0.7, 0)
  497. ga = Instance.new('ParticleEmitter')
  498. ga.Parent = ea
  499. ga.Texture = "rbxassetid://29712167"
  500. ga.Size = NumberSequence.new(0.2,0.05)
  501. ga.Acceleration = Vector3.new(0, -20, 0)
  502. ga.Rate = 100000
  503. ga.Speed = NumberRange.new(7,8)
  504. ga.Lifetime = NumberRange.new(3,4)
  505. ga.VelocitySpread = 10
  506. ga.VelocityInheritance = 0.3
  507. ga.EmissionDirection = Enum.NormalId.Bottom
  508. end
  509. end
  510. end
  511.  
  512. function gettouching(startpos,endpos,dont)
  513. local ray = Ray.new(startpos,(endpos-startpos).unit*300)
  514. local ignore = {}
  515. for i,v in pairs(game:GetService('Players'):GetChildren()) do
  516. if v.Character and v ~= plr then
  517. table.insert(ignore,v.Character)
  518. end
  519. end
  520. local part,pos = workspace:FindPartOnRayWithWhitelist(ray,ignore,false)
  521. if part then
  522. if part.Parent:FindFirstChildOfClass('Humanoid') and part.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then
  523. local coru = coroutine.wrap(function()
  524. Kill(part.Parent,false,true)
  525. end)
  526. coru()
  527. end
  528. end
  529. table.insert(ignore,dont)
  530. local part2,pos2 = workspace:FindPartOnRayWithIgnoreList(ray,ignore,false,true)
  531. if part2 and part2.Parent and part2.Parent ~= plr.Character and part2.Parent:FindFirstChildOfClass('Humanoid') and part2.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then
  532. local coru = coroutine.wrap(function()
  533. Kill(part2.Parent,false,true)
  534. end)
  535. coru()
  536. end
  537. end
  538.  
  539. function makelaser(parent)
  540. local part = Instance.new('Part',parent)
  541. part.Size = Vector3.new(0.2,0.2,0.2)
  542. part.Transparency = 1
  543. part.CanCollide = false
  544. local weld = Instance.new('Weld',part)
  545. weld.Part0 = part
  546. weld.Part1 = plr.Character["Right Arm"]
  547. weld.C0 = CFrame.new(0,1.25,0)
  548. for i=1,5 do
  549. local mouse = mou
  550. targ = mouse.Target
  551. if targ then
  552. hum = targ.Parent:findFirstChild("Humanoid")
  553. Hit = mouse.hit
  554. local P = Instance.new("Part")
  555. P.Name = "Guideline"
  556. P.Material = Enum.Material.Neon
  557. local Place0 = part.CFrame
  558. P.formFactor = 0
  559. P.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude)
  560. if plr.Character:FindFirstChild('Right Arm') then
  561. for i,v in pairs(plr.Character:FindFirstChild('Right Arm'):GetChildren()) do
  562. if v:IsA('Sound') and v.Name == "Electricity" then
  563. if Place0 and Hit and (Place0.p - Hit.p).magnitude >= 20 then
  564. v.MaxDistance = (Place0.p - Hit.p).magnitude
  565. v.EmitterSize = (Place0.p - Hit.p).magnitude
  566. elseif Place0 and Hit then
  567. v.MaxDistance = 20
  568. v.EmitterSize = 20
  569. end
  570. end
  571. end
  572. end
  573. P.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
  574. P.Parent = parent
  575. P.BrickColor = BrickColor.Yellow()
  576. P.Anchored = true
  577. P.CanCollide = false
  578. P.Transparency = 1
  579. local m = Instance.new("BlockMesh")
  580. m.Scale = Vector3.new(0.1,0.1,1)
  581. m.Parent = P
  582. local mh = mouse.Hit
  583. for c1 = 1, 1 do
  584. oldHit = part.CFrame
  585. for count = 1, 9 do
  586. local val1 = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))
  587. local val2 = P.Size.z / 10
  588. local val3 = P.CFrame.lookVector * -1
  589. local val4 = count * val2
  590. local val5 = val4 * val3
  591. local val6 = part.CFrame.p
  592. local Hit = CFrame.new(val5 + val1 + val6)
  593. local s = Instance.new("Part")
  594. s.Name = "Spark"
  595. s.Material = Enum.Material.Neon
  596. local Place0 = oldHit
  597. s.formFactor = 0
  598. s.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude)
  599. s.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
  600. s.Parent = parent
  601. s.BrickColor = BrickColor.new('Instatutional white')
  602. s.Anchored = true
  603. s.CanCollide = false
  604. m = Instance.new("BlockMesh")
  605. m.Scale = Vector3.new(0.1,0.1,1)
  606. m.Parent = s
  607. local clone = s:clone()
  608. clone.Mesh.Scale = Vector3.new(0.3,0.3,1.1)
  609. clone.BrickColor = BrickColor.new('Electric blue')
  610. clone.Transparency = 0.8
  611. clone.Parent = s.Parent
  612. oldHit = Hit
  613. end
  614. Hit = oldHit
  615. local s = Instance.new("Part")
  616. s.Name = "Spark"
  617. s.Material = Enum.Material.Neon
  618. local Place0 = mh
  619. s.formFactor = 0
  620. s.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude)
  621. s.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
  622. s.Parent = parent
  623. s.BrickColor = BrickColor.new('Instatutional white')
  624. s.Anchored = true
  625. s.CanCollide = false
  626. m = Instance.new("BlockMesh")
  627. m.Scale = Vector3.new(0.1,0.1,1)
  628. m.Parent = s
  629. local clone = s:clone()
  630. clone.Mesh.Scale = Vector3.new(0.3,0.3,1.1)
  631. clone.BrickColor = BrickColor.new('Electric blue')
  632. clone.Transparency = 0.8
  633. clone.Parent = s.Parent
  634. gettouching(part.Position,mou.Hit.p,parent)
  635. end
  636. P:remove()
  637. end
  638. end
  639. end
  640.  
  641. function chokearms(chr)
  642. if chr:FindFirstChild('Torso') then
  643. if chr:FindFirstChild('Right Arm') then
  644. if chr.Torso:FindFirstChild('Right Shoulder') then
  645. chr.Torso["Right Shoulder"]:Destroy()
  646. end
  647. local thing = Instance.new('Weld',chr.Torso)
  648. thing.Name = "Right Shoulder"
  649. thing.Part0 = chr.Torso
  650. thing.Part1 = chr["Right Arm"]
  651. 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)
  652. end
  653. if chr:FindFirstChild('Left Arm') then
  654. if chr.Torso:FindFirstChild('Left Shoulder') then
  655. chr.Torso["Left Shoulder"]:Destroy()
  656. end
  657. local thing = Instance.new('Weld',chr.Torso)
  658. thing.Name = "Left Shoulder"
  659. thing.Part0 = chr["Left Arm"]
  660. thing.Part1 = chr.Torso
  661. 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)
  662. end
  663. end
  664. end
  665.  
  666. function fixarms(chr)
  667. if chr:FindFirstChild('Torso') then
  668. for i,v in pairs(chr.Torso:GetChildren()) do
  669. if v.Name == "Right Shoulder" or v.Name == "Left Shoulder" then
  670. v:Destroy()
  671. end
  672. end
  673. if chr:FindFirstChild('Right Arm') then
  674. local rs = Instance.new('Motor6D',chr.Torso)
  675. rs.Name = "Right Shoulder"
  676. rs.Part0 = chr.Torso
  677. rs.Part1 = chr:FindFirstChild('Right Arm')
  678. rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  679. rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  680. end
  681. if chr:FindFirstChild('Left Arm') then
  682. local ls = Instance.new('Motor6D',chr.Torso)
  683. ls.Name = "Left Shoulder"
  684. ls.Part0 = chr.Torso
  685. ls.Part1 = chr:FindFirstChild('Left Arm')
  686. ls.C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  687. ls.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  688. end
  689. end
  690. end
  691.  
  692. mou.KeyDown:connect(function(key)
  693. if key == "f" and mou.Target and zapping == false then
  694. if choking == false then
  695. local hum = mou.Target.Parent:FindFirstChildOfClass('Humanoid')
  696.  
  697. if hum == nil then
  698. hum = mou.Target.Parent.Parent:FindFirstChildOfClass('Humanoid')
  699. end
  700.  
  701. if hum and hum.Parent:FindFirstChild('Torso') and hum.Health > 0 then
  702. beforehealth = hum.Health
  703. choking = true
  704. target = hum.Parent.Torso
  705. local sound = Instance.new('Sound',target)
  706. sound.Volume = 5
  707. sound.EmitterSize = 50
  708. sound.MaxDistance = 100
  709. sound.SoundId = 'rbxassetid://418658161'
  710. sound.Looped = false
  711. sound.PlaybackSpeed = 0.75
  712. sound.Name = "Choking"
  713. sound:Play()
  714. startpos = target.CFrame
  715. chokearms(target.Parent)
  716. local bod = Instance.new('BodyPosition',hum.Parent.Torso)
  717. bod.Position = target.Position+Vector3.new(0,12,0)
  718. bod.MaxForce = Vector3.new(100000,100000,100000)
  719. bod.P = 1000
  720. bod.D = 500
  721. end
  722. if target and target:FindFirstChild('Breathing') then
  723. target.Breathing:Destroy()
  724. end
  725. local coru = coroutine.wrap(function()
  726. while timez < 5 and choking do
  727. timez = timez + 0.1
  728. if target.Parent:FindFirstChildOfClass('Humanoid') then
  729. if target.Parent:FindFirstChildOfClass('Humanoid').Health - (beforehealth/49) > 0 then
  730. target.Parent:FindFirstChildOfClass('Humanoid').Health = target.Parent:FindFirstChildOfClass('Humanoid').Health - (beforehealth/49)
  731. end
  732. end
  733. wait(0.1)
  734. end
  735. if timez >= 5 then
  736. if target and target.Parent and target.Parent:FindFirstChildOfClass('Humanoid') and target.Parent:FindFirstChildOfClass('Humanoid').Health > 0 then
  737. if target and target:FindFirstChild('Choking') then
  738. target.Choking:Stop()
  739. target.Choking:Destroy()
  740. end
  741. if target then
  742. for i,v in pairs(target:GetChildren()) do
  743. if v:IsA("BodyPosition") then
  744. v:Destroy()
  745. end
  746. end
  747. end
  748. Kill(target.Parent,false,false)
  749. end
  750. end
  751. target = nil
  752. choking = false
  753. startpos = CFrame.new(0,0,0)
  754. timez = 0
  755. for i,v in pairs(plr.Character.Torso:GetChildren()) do
  756. if v.Name == "Right Shoulder" and v:IsA('Weld') then
  757. v:Destroy()
  758. end
  759. end
  760. if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then
  761. local rs = Instance.new('Motor6D',plr.Character.Torso)
  762. rs.Name = "Right Shoulder"
  763. rs.Part0 = plr.Character.Torso
  764. rs.Part1 = plr.Character:FindFirstChild('Right Arm')
  765. rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  766. rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  767. end
  768. end)
  769. coru()
  770. else
  771. if target and target:FindFirstChild('Choking') then
  772. fixarms(target.Parent)
  773. target.Choking:Stop()
  774. target.Choking:Destroy()
  775. local sound = Instance.new('Sound',target)
  776. sound.Volume = 5
  777. sound.EmitterSize = 50
  778. sound.MaxDistance = 100
  779. sound.SoundId = 'rbxassetid://304511128'
  780. sound.Looped = true
  781. sound.PlaybackSpeed = 1
  782. sound.Name = "Breathing"
  783. sound:Play()
  784. game:GetService('Debris'):AddItem(sound,timez)
  785. for i,v in pairs(target:GetChildren()) do
  786. if v:IsA("BodyPosition") then
  787. v:Destroy()
  788. end
  789. end
  790. end
  791. if target.Parent:FindFirstChildOfClass('Humanoid') then
  792. target.Parent:FindFirstChildOfClass('Humanoid').Health = beforehealth
  793. end
  794. target = nil
  795. choking = false
  796. startpos = CFrame.new(0,0,0)
  797. timez = 0
  798. end
  799. elseif key == "g" and choking == false then
  800. zapping = true
  801. local electricity = Instance.new("Sound",plr.Character:FindFirstChild('Right Arm'))
  802. electricity.Name = "Electricity"
  803. electricity.SoundId = "rbxassetid://379557765"
  804. electricity.Volume = 5
  805. electricity.EmitterSize = 100
  806. electricity.MaxDistance = 100
  807. electricity.Looped = true
  808. electricity:Play()
  809. end
  810. end)
  811.  
  812. mou.KeyUp:connect(function(key)
  813. if key == "g" then
  814. zapping = false
  815. if plr.Character:FindFirstChild('Right Arm') then
  816. for i,v in pairs(plr.Character:FindFirstChild('Right Arm'):GetChildren()) do
  817. if v:IsA('Sound') and v.Name == "Electricity" then
  818. v:Destroy()
  819. end
  820. end
  821. end
  822. end
  823. end)
  824.  
  825.  
  826. while true do
  827. 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
  828. for i,v in pairs(plr.Character.Torso:GetChildren()) do
  829. if v.Name == "Right Shoulder" then
  830. v:Destroy()
  831. end
  832. end
  833. local Head = plr.Character.Head
  834. local RightArm = plr.Character["Right Arm"]
  835. local RightShoulder = Instance.new('Weld',plr.Character.Torso)
  836. RightShoulder.Name = "Right Shoulder"
  837. RightShoulder.Part0 = plr.Character.Torso
  838. RightShoulder.Part1 = RightArm
  839. RightShoulder.C0 = CFrame.new(1,1,-0.75)
  840. local MousePosition = target.Position+(target.Size/2)
  841. local ToMouse = (MousePosition - Head.Position).unit
  842. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  843. 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)))
  844. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  845. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  846. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  847. if tostring(LateralAngle) == "-1.#IND" then
  848. LateralAngle = 0
  849. end
  850. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  851. local change = false
  852. if LateralAngle > (math.pi / 2) then
  853. LateralAngle = (math.pi / 2)
  854. change = true
  855. end
  856. if Cross.Y < 0 then
  857. LateralAngle = -LateralAngle
  858. end
  859. RightShoulder.C0 = CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2)
  860. for i,v in pairs(target.Parent:GetChildren()) do
  861. if v:IsA('Tool') then
  862. v.ManualActivationOnly = true
  863. end
  864. end
  865. elseif zapping == false and plr and plr.Character and plr.Character:FindFirstChild("Torso") and plr.Character:FindFirstChild('Right Arm') then
  866. for i,v in pairs(plr.Character.Torso:GetChildren()) do
  867. if v.Name == "Right Shoulder" and v:IsA('Weld') then
  868. v:Destroy()
  869. end
  870. end
  871. if target then
  872. for i,v in pairs(target:GetChildren()) do
  873. if v:IsA("BodyPosition") then
  874. v:Destroy()
  875. end
  876. end
  877. if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then
  878. local rs = Instance.new('Motor6D',plr.Character.Torso)
  879. rs.Name = "Right Shoulder"
  880. rs.Part0 = plr.Character.Torso
  881. rs.Part1 = plr.Character:FindFirstChild('Right Arm')
  882. rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  883. rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  884. end
  885. if target.Parent then
  886. for i,v in pairs(target.Parent:GetChildren()) do
  887. if v:IsA('Tool') then
  888. v.ManualActivationOnly = false
  889. end
  890. end
  891. end
  892. end
  893. target = nil
  894. choking = false
  895. startpos = CFrame.new(0,0,0)
  896. timez = 0
  897. end
  898. 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
  899. if lastzap then
  900. lastzap:Destroy()
  901. lastzap = nil
  902. end
  903. for i,v in pairs(plr.Character.Torso:GetChildren()) do
  904. if v.Name == "Right Shoulder" then
  905. v:Destroy()
  906. end
  907. end
  908. local Head = plr.Character.Head
  909. local RightArm = plr.Character["Right Arm"]
  910. local RightShoulder = Instance.new('Weld',plr.Character.Torso)
  911. RightShoulder.Name = "Right Shoulder"
  912. RightShoulder.Part0 = plr.Character.Torso
  913. RightShoulder.Part1 = RightArm
  914. RightShoulder.C0 = CFrame.new(1,1,-0.75)
  915. local MousePosition = mou.Hit.p
  916. local ToMouse = (MousePosition - Head.Position).unit
  917. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  918. 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)))
  919. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  920. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  921. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  922. if tostring(LateralAngle) == "-1.#IND" then
  923. LateralAngle = 0
  924. end
  925. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  926. local change = false
  927. if LateralAngle > (math.pi / 2) then
  928. LateralAngle = (math.pi / 2)
  929. change = true
  930. end
  931. if Cross.Y < 0 then
  932. LateralAngle = -LateralAngle
  933. end
  934. RightShoulder.C0 = CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2)
  935. local thing = Instance.new('Model',workspace)
  936. thing.Name = "Zap"
  937. lastzap = thing
  938. makelaser(thing)
  939. elseif choking == false and zapping == false then
  940. if lastzap then
  941. lastzap:Destroy()
  942. lastzap = nil
  943. end
  944. if plr.Character:FindFirstChild('Torso') then
  945. for i,v in pairs(plr.Character.Torso:GetChildren()) do
  946. if v.Name == "Right Shoulder" and v:IsA('Weld') then
  947. v:Destroy()
  948. end
  949. end
  950. if plr.Character.Torso:FindFirstChild('Right Shoulder') == nil then
  951. local rs = Instance.new('Motor6D',plr.Character.Torso)
  952. rs.Name = "Right Shoulder"
  953. rs.Part0 = plr.Character.Torso
  954. rs.Part1 = plr.Character:FindFirstChild('Right Arm')
  955. rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  956. rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  957. end
  958. end
  959. end
  960. wait()
  961. end
  962. end
Advertisement
Add Comment
Please, Sign In to add comment