Advertisement
Mitko1223tm

fl test

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