Advertisement
iiMurpyh

Untitled

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