Advertisement
Guest User

Untitled

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