Advertisement
TheClassicMeme

test 1

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