swerve_noob_swerve1

glock

Sep 23rd, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. wait(1)
  7. ---------------------------[[[ VARIABLES ]]]---------------------------
  8.  
  9. local plr = game.Players.LocalPlayer
  10. local chr = plr.Character
  11. local mou = plr:GetMouse()
  12. local leftarm = false
  13. local active = false
  14. local curkey = "f"
  15. local stunneds = {}
  16.  
  17. ---------------------------[[[ PARTS ]]]---------------------------
  18.  
  19. -- 1 - Glock
  20. obj1 = Instance.new("Model")
  21. obj1.Name = "Glock"
  22. obj1.Parent = chr
  23.  
  24. -- 2 - Part
  25. obj2 = Instance.new("Part")
  26. obj2.CFrame = CFrame.new(Vector3.new(14.25, 3.51428652, 46.8584824)) * CFrame.Angles(0.69812995195389, 0, -0)
  27. obj2.TopSurface = Enum.SurfaceType.Smooth
  28. obj2.BottomSurface = Enum.SurfaceType.Smooth
  29. obj2.Material = Enum.Material.Metal
  30. obj2.Size = Vector3.new(0.300000012, 0.200000003, 0.200000003)
  31. obj2.Anchored = true
  32. obj2.BrickColor = BrickColor.new("Black")
  33. obj2.Friction = 0.30000001192093
  34. obj2.Shape = Enum.PartType.Block
  35. obj2.CanCollide = false
  36. obj2.Parent = obj1
  37.  
  38. -- 3 - Top
  39. obj3 = Instance.new("Part")
  40. obj3.CFrame = CFrame.new(Vector3.new(14.25, 3.8499999, 47.1499977)) * CFrame.Angles(-0, 0, -0)
  41. obj3.TopSurface = Enum.SurfaceType.Smooth
  42. obj3.BottomSurface = Enum.SurfaceType.Smooth
  43. obj3.Material = Enum.Material.Metal
  44. obj3.Size = Vector3.new(0.300000012, 0.300000012, 1.5)
  45. obj3.Anchored = true
  46. obj3.BrickColor = BrickColor.new("Ghost grey")
  47. obj3.Friction = 0.30000001192093
  48. obj3.Shape = Enum.PartType.Block
  49. obj3.CanCollide = false
  50. obj3.Name = "Top"
  51. obj3.Parent = obj1
  52.  
  53. -- 4 - Top
  54. obj4 = Instance.new("Part")
  55. obj4.CFrame = CFrame.new(Vector3.new(14.25, 3.8499999, 47.8999977)) * CFrame.Angles(0, 1.5707963705063, 0)
  56. obj4.TopSurface = Enum.SurfaceType.Smooth
  57. obj4.BottomSurface = Enum.SurfaceType.Smooth
  58. obj4.Material = Enum.Material.Metal
  59. obj4.Size = Vector3.new(0.200000003, 0.299999982, 0.300000012)
  60. obj4.Anchored = true
  61. obj4.BrickColor = BrickColor.new("Ghost grey")
  62. obj4.Friction = 0.30000001192093
  63. obj4.Shape = Enum.PartType.Cylinder
  64. obj4.Name = "Top"
  65. obj4.CanCollide = false
  66. obj4.Parent = obj1
  67.  
  68. -- 5 - Part
  69. obj5 = Instance.new("Part")
  70. obj5.CFrame = CFrame.new(Vector3.new(14.25, 3.35359001, 47.1499939)) * CFrame.Angles(-1.5707978010178, 0, -0)
  71. obj5.TopSurface = Enum.SurfaceType.Smooth
  72. obj5.BottomSurface = Enum.SurfaceType.Smooth
  73. obj5.Material = Enum.Material.Metal
  74. obj5.Size = Vector3.new(0.300000012, 0.200000003, 0.299999982)
  75. obj5.Anchored = true
  76. obj5.BrickColor = BrickColor.new("Black")
  77. obj5.Friction = 0.30000001192093
  78. obj5.Shape = Enum.PartType.Block
  79. obj5.CanCollide = false
  80. obj5.Parent = obj1
  81.  
  82. -- 6 - Part
  83. obj6 = Instance.new("Part")
  84. obj6.CFrame = CFrame.new(Vector3.new(14.25, 3.5999999, 47.1499977)) * CFrame.Angles(-0, 0, -0)
  85. obj6.TopSurface = Enum.SurfaceType.Smooth
  86. obj6.BottomSurface = Enum.SurfaceType.Smooth
  87. obj6.Material = Enum.Material.Metal
  88. obj6.Size = Vector3.new(0.300000012, 0.200000003, 1.5)
  89. obj6.Anchored = true
  90. obj6.BrickColor = BrickColor.new("Black")
  91. obj6.CanCollide = false
  92. obj6.Friction = 0.30000001192093
  93. obj6.Shape = Enum.PartType.Block
  94. obj6.Parent = obj1
  95.  
  96. -- 7 - Part
  97. obj7 = Instance.new("Part")
  98. obj7.CFrame = CFrame.new(Vector3.new(14.25, 3.60000014, 47.8999977)) * CFrame.Angles(0, 1.5707963705063, 0)
  99. obj7.TopSurface = Enum.SurfaceType.Smooth
  100. obj7.BottomSurface = Enum.SurfaceType.Smooth
  101. obj7.Material = Enum.Material.Metal
  102. obj7.Size = Vector3.new(0.200000003, 0.200000003, 0.300000012)
  103. obj7.Anchored = true
  104. obj7.BrickColor = BrickColor.new("Black")
  105. obj7.CanCollide = false
  106. obj7.Friction = 0.30000001192093
  107. obj7.Shape = Enum.PartType.Cylinder
  108. obj7.Parent = obj1
  109.  
  110. -- 8 - Part
  111. obj8 = Instance.new("Part")
  112. obj8.CFrame = CFrame.new(Vector3.new(14.25, 3.15358996, 46.8499985)) * CFrame.Angles(1.1920913323138e-007, 0, -0)
  113. obj8.TopSurface = Enum.SurfaceType.Smooth
  114. obj8.BottomSurface = Enum.SurfaceType.Smooth
  115. obj8.Material = Enum.Material.Metal
  116. obj8.Size = Vector3.new(0.300000012, 0.200000003, 0.699999988)
  117. obj8.Anchored = true
  118. obj8.BrickColor = BrickColor.new("Black")
  119. obj8.Friction = 0.30000001192093
  120. obj8.CanCollide = false
  121. obj8.Shape = Enum.PartType.Block
  122. obj8.Parent = obj1
  123.  
  124. -- 9 - Part
  125. obj9 = Instance.new("Part")
  126. obj9.CFrame = CFrame.new(Vector3.new(14.25, 3.27858996, 46.5067024)) * CFrame.Angles(-1.0471963882446, 0, -0)
  127. obj9.TopSurface = Enum.SurfaceType.Smooth
  128. obj9.BottomSurface = Enum.SurfaceType.Smooth
  129. obj9.Material = Enum.Material.Metal
  130. obj9.Size = Vector3.new(0.300000012, 0.300000012, 0.699999988)
  131. obj9.Anchored = true
  132. obj9.BrickColor = BrickColor.new("Black")
  133. obj9.CanCollide = false
  134. obj9.Friction = 0.30000001192093
  135. obj9.Shape = Enum.PartType.Block
  136. obj9.Parent = obj1
  137.  
  138. local previous = nil
  139. for i,v in pairs(obj1:GetChildren()) do
  140. if v:IsA('BasePart') then
  141. if previous then
  142. local weld = Instance.new('Weld',v)
  143. weld.Part0 = v
  144. weld.Part1 = previous
  145. weld.C0 = v.CFrame:inverse() * previous.CFrame
  146. previous.Anchored = false
  147. end
  148. previous = v
  149. end
  150. end
  151. previous.Anchored = false
  152.  
  153. ---------------------------[[[ FUNCTIONS ]]]---------------------------
  154.  
  155. function notify(msg,forever)
  156. local doit = coroutine.wrap(function()
  157. for i,v in pairs(plr.PlayerGui:GetChildren()) do
  158. if v.Name == "Notification" and v:IsA('ScreenGui') then
  159. v:Destroy()
  160. end
  161. end
  162. local gui = Instance.new('ScreenGui',plr.PlayerGui)
  163. gui.Name = "Notification"
  164. local frame = Instance.new('Frame',gui)
  165. frame.Position = UDim2.new(0,0,0,0)
  166. frame.Size = UDim2.new(1,0,0.2,0)
  167. frame.BackgroundTransparency = 1
  168. local txt = Instance.new('TextLabel',frame)
  169. txt.TextColor3 = Color3.new(255,255,255)
  170. txt.TextStrokeColor3 = Color3.new(0, 0, 0)
  171. txt.TextStrokeTransparency = 0
  172. txt.BackgroundTransparency = 1
  173. txt.Text = ""
  174. txt.Size = UDim2.new(1,0,0.3,0)
  175. txt.Position = UDim2.new(0,0,0.4,0)
  176. txt.TextScaled = true
  177. txt.Font = "Code"
  178. txt.TextXAlignment = "Center"
  179. local tap = Instance.new("Sound")
  180. tap.Parent = plr.Backpack
  181. tap.SoundId = "rbxassetid://147982968"
  182. tap.TimePosition = 0.1
  183. local str = msg
  184. local len = string.len(str)
  185. for i=1,len do
  186. txt.Text = string.sub(str,1,i)
  187. local pitche = math.random(2, 4)
  188. tap.PlaybackSpeed = pitche
  189. tap:Play()
  190. wait(0.05)
  191. end
  192. if forever == false then
  193. wait(1)
  194. while txt.TextTransparency < 1 do
  195. txt.TextTransparency = txt.TextTransparency + 0.1
  196. txt.TextStrokeTransparency = txt.TextStrokeTransparency + 0.1
  197. wait()
  198. end
  199. gui:Destroy()
  200. end
  201. end)
  202. doit()
  203. end
  204.  
  205.  
  206. function damage(playa,hita)
  207. local hitz = hita.Name
  208. local heyy = hitz
  209. if hitz == "Right Arm" then
  210. local Limb = playa:FindFirstChild("Right Arm")
  211. local ters = playa:FindFirstChild('Torso')
  212. if Limb and ters then
  213. if ters:FindFirstChild('Right Shoulder') then ters["Right Shoulder"]:Destroy() end
  214. for i,v in pairs(Limb:GetChildren()) do
  215. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  216. v:Destroy()
  217. end
  218. end
  219. Limb.CFrame = ters.CFrame * CFrame.new(1.5, 0, 0)
  220. local Joint = Instance.new("Glue")
  221. Joint.Name = "RightShoulder"
  222. Joint.Part0 = ters
  223. Joint.Part1 = Limb
  224. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  225. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  226. Joint.Parent = ters
  227.  
  228. local B = Instance.new("Part")
  229. B.TopSurface = 0
  230. B.BottomSurface = 0
  231. B.formFactor = "Symmetric"
  232. B.Size = Vector3.new(1, 1, 1)
  233. B.Transparency = 1
  234. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  235. B.Parent = playa
  236. local W = Instance.new("Weld")
  237. W.Part0 = Limb
  238. W.Part1 = B
  239. W.C0 = CFrame.new(0, -0.5, 0)
  240. W.Parent = Limb
  241. end
  242. elseif hitz == "Left Arm" then
  243. local Limb = playa:FindFirstChild("Left Arm")
  244. local ters = playa:FindFirstChild('Torso')
  245. if Limb and ters then
  246. if ters:FindFirstChild('Left Shoulder') then ters["Left Shoulder"]:Destroy() end
  247. for i,v in pairs(Limb:GetChildren()) do
  248. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  249. v:Destroy()
  250. end
  251. end
  252. Limb.CFrame = ters.CFrame * CFrame.new(-1.5, 0, 0)
  253. local Joint = Instance.new("Glue")
  254. Joint.Name = "LeftShoulder"
  255. Joint.Part0 = ters
  256. Joint.Part1 = Limb
  257. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  258. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  259. Joint.Parent = ters
  260. local B = Instance.new("Part")
  261. B.TopSurface = 0
  262. B.BottomSurface = 0
  263. B.formFactor = "Symmetric"
  264. B.Size = Vector3.new(1, 1, 1)
  265. B.Transparency = 1
  266. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  267. B.Parent = playa
  268. local W = Instance.new("Weld")
  269. W.Part0 = ters
  270. W.Part1 = B
  271. W.C0 = CFrame.new(0, -0.5, 0)
  272. W.Parent = Limb
  273. end
  274. elseif hitz == "Right Leg" then
  275. local Limb = playa:FindFirstChild("Right Leg")
  276. local ters = playa:FindFirstChild('Torso')
  277. if Limb and ters then
  278. if ters:FindFirstChild('Right Hip') then ters["Right Hip"]:Destroy() end
  279. for i,v in pairs(Limb:GetChildren()) do
  280. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  281. v:Destroy()
  282. end
  283. end
  284. Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0)
  285. local Joint = Instance.new("Glue")
  286. Joint.Name = "Right Hip"
  287. Joint.Part0 = ters
  288. Joint.Part1 = Limb
  289. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  290. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  291. Joint.Parent = ters
  292. local B = Instance.new("Part")
  293. B.TopSurface = 0
  294. B.BottomSurface = 0
  295. B.formFactor = "Symmetric"
  296. B.Size = Vector3.new(1, 1, 1)
  297. B.Transparency = 1
  298. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  299. B.Parent = playa
  300. local W = Instance.new("Weld")
  301. W.Part0 = Limb
  302. W.Part1 = B
  303. W.C0 = CFrame.new(0, -0.5, 0)
  304. W.Parent = Limb
  305. if playa:FindFirstChildOfClass('Humanoid') then
  306. local hum = playa:FindFirstChildOfClass('Humanoid')
  307. local target = playa
  308. if target:FindFirstChild('HumanoidRootPart') then
  309. target.HumanoidRootPart:Destroy()
  310. end
  311. local found = false
  312. for i,v in pairs(stunneds) do
  313. if v == hum then
  314. found = true
  315. end
  316. end
  317. if found == false then
  318. table.insert(stunneds,hum)
  319. end
  320. end
  321. end
  322. elseif hitz == "Left Leg" then
  323. local Limb = playa:FindFirstChild("Left Leg")
  324. local ters = playa:FindFirstChild('Torso')
  325. if Limb and ters then
  326. if ters:FindFirstChild('Left Hip') then ters["Left Hip"]:Destroy() end
  327. for i,v in pairs(Limb:GetChildren()) do
  328. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  329. v:Destroy()
  330. end
  331. end
  332. Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0)
  333. Limb.CFrame = ters.CFrame * CFrame.new(-0.5, -2, 0)
  334. local Joint = Instance.new("Glue")
  335. Joint.Name = "LeftHip"
  336. Joint.Part0 = ters
  337. Joint.Part1 = Limb
  338. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  339. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  340. Joint.Parent = ters
  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 = playa
  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. Limb.CanCollide = false
  356. if playa:FindFirstChildOfClass('Humanoid') then
  357. local hum = playa:FindFirstChildOfClass('Humanoid')
  358. local target = playa
  359. if target:FindFirstChild('HumanoidRootPart') then
  360. target.HumanoidRootPart:Destroy()
  361. end
  362. local found = false
  363. for i,v in pairs(stunneds) do
  364. if v == hum then
  365. found = true
  366. end
  367. end
  368. if found == false then
  369. table.insert(stunneds,hum)
  370. end
  371. end
  372. end
  373. else
  374. local playa2 = playa
  375. playa.Archivable = true
  376. local playa = playa:Clone()
  377. playa.Archivable = false
  378. playa2:Destroy()
  379. playa.Parent = workspace
  380. local Gibs = game.Workspace
  381. print(playa)
  382. local Torso = playa.Torso
  383. local Head = playa:FindFirstChild("Head")
  384. local function Scan(ch)
  385. local e
  386. for e = 1,#ch do
  387. Scan(ch[e]:GetChildren())
  388. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  389. ch[e]:remove()
  390. end
  391. end
  392. end
  393. Scan(playa:GetChildren())
  394. if playa:FindFirstChild('HumanoidRootPart') then
  395. playa:FindFirstChild('HumanoidRootPart'):Destroy()
  396. end
  397. local hum2 = playa:FindFirstChildOfClass("Humanoid")
  398.  
  399.  
  400. if hum2 ~= nil then
  401. hum2.Name = "Humanoid2"
  402. hum2.PlatformStand = true
  403. hum2.Health = 0
  404. end
  405. local ch = playa:GetChildren()
  406. local i
  407. for i = 1,#ch do
  408. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  409. ch[i]:remove()
  410. end
  411. end
  412.  
  413. if Head then
  414. local Neck = Instance.new("Weld")
  415. Neck.Name = "Neck"
  416. Neck.Part0 = Torso
  417. Neck.Part1 = Head
  418. Neck.C0 = CFrame.new(0, 1.5, 0)
  419. Neck.C1 = CFrame.new()
  420. Neck.Parent = Torso
  421. end
  422. local Limb = playa:FindFirstChild("Right Arm")
  423. if Limb then
  424.  
  425. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  426. local Joint = Instance.new("Glue")
  427. Joint.Name = "RightShoulder"
  428. Joint.Part0 = Torso
  429. Joint.Part1 = Limb
  430. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  431. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  432. Joint.Parent = Torso
  433.  
  434. local B = Instance.new("Part")
  435. B.TopSurface = 0
  436. B.BottomSurface = 0
  437. B.formFactor = "Symmetric"
  438. B.Size = Vector3.new(1, 1, 1)
  439. B.Transparency = 1
  440. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  441. B.Parent = playa
  442. local W = Instance.new("Weld")
  443. W.Part0 = Limb
  444. W.Part1 = B
  445. W.C0 = CFrame.new(0, -0.5, 0)
  446. W.Parent = Limb
  447. end
  448. local Limb = playa:FindFirstChild("Left Arm")
  449. if Limb then
  450.  
  451. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  452. local Joint = Instance.new("Glue")
  453. Joint.Name = "LeftShoulder"
  454. Joint.Part0 = Torso
  455. Joint.Part1 = Limb
  456. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  457. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  458. Joint.Parent = Torso
  459.  
  460. local B = Instance.new("Part")
  461. B.TopSurface = 0
  462. B.BottomSurface = 0
  463. B.formFactor = "Symmetric"
  464. B.Size = Vector3.new(1, 1, 1)
  465. B.Transparency = 1
  466. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  467. B.Parent = playa
  468. local W = Instance.new("Weld")
  469. W.Part0 = Limb
  470. W.Part1 = B
  471. W.C0 = CFrame.new(0, -0.5, 0)
  472. W.Parent = Limb
  473. end
  474. local Limb = playa:FindFirstChild("Right Leg")
  475. if Limb then
  476.  
  477. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  478. local Joint = Instance.new("Glue")
  479. Joint.Name = "RightHip"
  480. Joint.Part0 = Torso
  481. Joint.Part1 = Limb
  482. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  483. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  484. Joint.Parent = Torso
  485.  
  486. local B = Instance.new("Part")
  487. B.TopSurface = 0
  488. B.BottomSurface = 0
  489. B.formFactor = "Symmetric"
  490. B.Size = Vector3.new(1, 1, 1)
  491. B.Transparency = 1
  492. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  493. B.Parent = playa
  494. local W = Instance.new("Weld")
  495. W.Part0 = Limb
  496. W.Part1 = B
  497. W.C0 = CFrame.new(0, -0.5, 0)
  498. W.Parent = Limb
  499. end
  500. local Limb = playa:FindFirstChild("Left Leg")
  501. if Limb then
  502.  
  503. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  504. local Joint = Instance.new("Glue")
  505. Joint.Name = "LeftHip"
  506. Joint.Part0 = Torso
  507. Joint.Part1 = Limb
  508. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  509. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  510. Joint.Parent = Torso
  511.  
  512. local B = Instance.new("Part")
  513. B.TopSurface = 0
  514. B.BottomSurface = 0
  515. B.formFactor = "Symmetric"
  516. B.Size = Vector3.new(1, 1, 1)
  517. B.Transparency = 1
  518. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  519. B.Parent = playa
  520. local W = Instance.new("Weld")
  521. W.Part0 = Limb
  522. W.Part1 = B
  523. W.C0 = CFrame.new(0, -0.5, 0)
  524. W.Parent = Limb
  525. end
  526. --[
  527. local Bar = Instance.new("Part")
  528. Bar.TopSurface = 0
  529. Bar.BottomSurface = 0
  530. Bar.formFactor = "Symmetric"
  531. Bar.Size = Vector3.new(1, 1, 1)
  532. Bar.Transparency = 1
  533. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  534. Bar.Parent = playa
  535. local Weld = Instance.new("Weld")
  536. Weld.Part0 = Torso
  537. Weld.Part1 = Bar
  538. Weld.C0 = CFrame.new(0, 0.5, 0)
  539. Weld.Parent = Torso
  540. --]]
  541. playa.Parent = Gibs
  542. game.Debris:AddItem(playa, 12)
  543. end
  544. end
  545.  
  546.  
  547. function calculate()
  548. if leftarm and chr:FindFirstChild('Head') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild("Left Shoulder") and chr:FindFirstChild('Left Arm') then
  549. local Head = plr.Character.Head
  550. local RightShoulder = plr.Character.Torso["Left Shoulder"]
  551. local RightArm = plr.Character["Left Arm"]
  552. local MousePosition = mou.Hit.p
  553. local ToMouse = (MousePosition - Head.Position).unit
  554. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  555. 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)))
  556. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(-1 ,0, -1)).unit
  557. local Look = (Head.CFrame.lookVector * Vector3.new(-1, 0, -1)).unit
  558. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  559. if tostring(LateralAngle) == "-1.#IND" then
  560. LateralAngle = 0
  561. end
  562. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  563. --[[
  564. if LateralAngle > (math.pi / 2) then
  565. LateralAngle = (math.pi / 2)
  566. if chr:FindFirstChild('Torso') then
  567. local Torso = chr.Torso
  568. local Point = Torso.CFrame:vectorToObjectSpace(mou.Hit.p-Torso.CFrame.p)
  569. if Point.Z > 0 then
  570. if Point.X > 0 then
  571. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  572. elseif Point.X < 0 then
  573. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  574. end
  575. end
  576. end
  577. end
  578. ]]--
  579. print(LateralAngle)
  580. warn(math.pi / 2)
  581. if Cross.Y < 0 then
  582. LateralAngle = -LateralAngle
  583. end
  584. return(CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  585. elseif chr:FindFirstChild('Head') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild("Right Shoulder") and chr:FindFirstChild('Right Arm') then
  586. local Head = plr.Character.Head
  587. local RightShoulder = plr.Character.Torso["Right Shoulder"]
  588. local RightArm = plr.Character["Right Arm"]
  589. local MousePosition = mou.Hit.p
  590. local ToMouse = (MousePosition - Head.Position).unit
  591. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  592. 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)))
  593. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  594. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  595. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  596. if tostring(LateralAngle) == "-1.#IND" then
  597. LateralAngle = 0
  598. end
  599. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  600. if LateralAngle > (math.pi / 2) then
  601. LateralAngle = (math.pi / 2)
  602. if chr:FindFirstChild('Torso') then
  603. local Torso = chr.Torso
  604. local Point = Torso.CFrame:vectorToObjectSpace(mou.Hit.p-Torso.CFrame.p)
  605. if Point.Z > 0 then
  606. if Point.X > 0 then
  607. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  608. elseif Point.X < 0 then
  609. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  610. end
  611. end
  612. end
  613. end
  614. if Cross.Y < 0 then
  615. LateralAngle = -LateralAngle
  616. end
  617. return(CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  618. end
  619. end
  620.  
  621. function fire()
  622. if mou.Target then
  623. local humanoid = mou.Target.Parent:FindFirstChildOfClass("Humanoid")
  624. if not humanoid then
  625. humanoid = mou.Target.Parent.Parent:FindFirstChildOfClass("Humanoid")
  626. end
  627. if humanoid then
  628. local coru = coroutine.wrap(function()
  629. damage(humanoid.Parent,mou.Target)
  630. end)
  631. coru()
  632. end
  633. end
  634. local beam = Instance.new("Part", workspace)
  635. beam.BrickColor = BrickColor.new("Bright yellow")
  636. beam.FormFactor = "Custom"
  637. beam.Material = "Neon"
  638. beam.Transparency = 0.25
  639. beam.Anchored = true
  640. beam.Locked = true
  641. beam.CanCollide = false
  642. local distance = (obj4.CFrame.p - mou.Hit.p).magnitude
  643. beam.Size = Vector3.new(0.2, 0.2, distance)
  644. beam.CFrame = CFrame.new(obj4.CFrame.p, mou.Hit.p) * CFrame.new(0, 0, -distance / 2)
  645. game:GetService("Debris"):AddItem(beam, 0.05)
  646. local sound = Instance.new('Sound',obj4)
  647. sound.SoundId = 'rbxassetid://139593133'
  648. sound.Volume = 3
  649. sound.EmitterSize = 40
  650. sound.MaxDistance = 450
  651. sound:Play()
  652. game:GetService("Debris"):AddItem(beam, sound.TimeLength)
  653. end
  654.  
  655. ---------------------------[[[ SCRIPT ]]]---------------------------
  656. if chr:FindFirstChild('Left Arm') == nil or chr:FindFirstChild('Torso') == nil or chr.Torso:FindFirstChild('Left Shoulder') == nil then
  657. leftarm = false
  658. end
  659. local weldas = Instance.new('Weld',obj2)
  660. if leftarm and chr:FindFirstChild('Left Arm') then
  661. weldas.Part0 = obj2
  662. weldas.Part1 = chr["Left Arm"]
  663. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  664. elseif chr:FindFirstChild('Right Arm') then
  665. weldas.Part0 = obj2
  666. weldas.Part1 = chr["Right Arm"]
  667. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  668. end
  669.  
  670.  
  671. if leftarm and chr:FindFirstChild('Left Arm') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild('Left Shoulder') then
  672. chr:FindFirstChild('Left Arm').AncestryChanged:connect(function(me,par)
  673. if par ~= chr and chr:FindFirstChild('Right Arm') then
  674. if obj2 and obj2:FindFirstChildOfClass('Weld') then
  675. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  676. end
  677. leftarm = false
  678. end
  679. end)
  680. chr.Torso:FindFirstChild('Left Shoulder').AncestryChanged:connect(function(me,par)
  681. if par ~= chr:FindFirstChild('Torso') and chr:FindFirstChild('Right Arm') then
  682. if obj2 and obj2:FindFirstChildOfClass('Weld') then
  683. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  684. end
  685. end
  686. leftarm = false
  687. end)
  688. elseif leftarm then
  689. if obj2 and obj2:FindFirstChildOfClass('Weld') and chr:FindFirstChild('Right Arm') then
  690. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  691. end
  692. end
  693.  
  694. mou.KeyDown:connect(function(key)
  695. if key == string.lower(curkey) then
  696. active = not active
  697. end
  698. end)
  699.  
  700. plr.Chatted:connect(function(msg)
  701. if string.lower(string.sub(msg,1,5)) == "!bind" then
  702. curkey = string.lower(string.sub(msg,7,7))
  703. notify([[Changed key for equip/unequip to "]]..curkey..[[".]],false)
  704. end
  705. end)
  706.  
  707. game:GetService('RunService').Stepped:connect(function()
  708. if active and chr:FindFirstChild('Torso') then
  709. if leftarm then
  710. chr.Torso["Left Shoulder"].C0 = calculate()
  711. else
  712. chr.Torso["Right Shoulder"].C0 = calculate()
  713. end
  714. weldas.Part1 = chr["Right Arm"]
  715. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  716. elseif chr:FindFirstChild('Torso') and (chr.Torso:FindFirstChild('Left Shoulder') or chr.Torso:FindFirstChild('Right Shoulder')) then
  717. if leftarm then
  718. chr.Torso["Left Shoulder"].C0 = CFrame.new(-1,0.5,0)*CFrame.Angles(0,-math.pi/2,0)
  719. else
  720. chr.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.pi/2,0)
  721. end
  722. weldas.Part1 = chr.Torso
  723. weldas.C0 = CFrame.new(-1,0,-1)*CFrame.Angles(math.rad(-90),0,0)
  724. end
  725. for i,v in pairs(stunneds) do
  726. v.PlatformStand = true
  727. end
  728. end)
  729.  
  730. mou.Button1Down:connect(function()
  731. if active then
  732. fire()
  733. end
  734. end)
  735.  
  736. notify([[Chat "!bind [key]" to bind a different key to equip/unequip. Current key is "f".]],false)
Advertisement
Add Comment
Please, Sign In to add comment