JacksoMykalJunior

WADAWDAW

Mar 3rd, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.10 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = owner
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87.  
  88.  
  89.  
  90. wait(1)
  91. ---------------------------[[[ VARIABLES ]]]---------------------------
  92.  
  93. local plr = owner
  94. local chr = plr.Character
  95. local leftarm = false
  96. local active = false
  97. local curkey = "f"
  98. local stunneds = {}
  99.  
  100. ---------------------------[[[ PARTS ]]]---------------------------
  101. Instance.new("ForceField", game.Players.owner.Character). Visible = False
  102.  
  103. -- 1 - Glock
  104. obj1 = Instance.new("Model")
  105. obj1.Name = "Glock"
  106. obj1.Parent = chr
  107.  
  108. -- 2 - Part
  109. obj2 = Instance.new("Part")
  110. obj2.CFrame = CFrame.new(Vector3.new(14.25, 3.51428652, 46.8584824)) * CFrame.Angles(0.69812995195389, 0, -0)
  111. obj2.TopSurface = Enum.SurfaceType.Smooth
  112. obj2.BottomSurface = Enum.SurfaceType.Smooth
  113. obj2.Material = Enum.Material.Neon
  114. obj2.Size = Vector3.new(0.300000012, 0.200000003, 0.200000003)
  115. obj2.Anchored = true
  116. obj2.Friction = 0.30000001192093
  117. obj2.Shape = Enum.PartType.Block
  118. obj2.CanCollide = false
  119. obj2.Parent = obj1
  120. obj2.Transparency = 0
  121.  
  122. -- 3 - Top
  123. obj3 = Instance.new("Part")
  124. obj3.CFrame = CFrame.new(Vector3.new(14.25, 3.8499999, 47.1499977)) * CFrame.Angles(-0, 0, -0)
  125. obj3.TopSurface = Enum.SurfaceType.Smooth
  126. obj3.BottomSurface = Enum.SurfaceType.Smooth
  127. obj3.Material = Enum.Material.Neon
  128. obj3.Size = Vector3.new(0.300000012, 0.300000012, 1.5)
  129. obj3.Anchored = true
  130. obj3.Friction = 0.30000001192093
  131. obj3.Shape = Enum.PartType.Block
  132. obj3.CanCollide = false
  133. obj3.Name = "Top"
  134. obj3.Parent = obj1
  135. obj3.Transparency = 0
  136. -----------
  137. local sound = Instance.new('Sound',obj1)
  138. sound.SoundId = 'rbxassetid://155561166'
  139. sound.Volume = 0.5
  140. sound.EmitterSize = 10
  141. sound.MaxDistance = 10
  142. sound.Looped = true
  143. sound:Play()
  144. -----------
  145.  
  146. -- 4 - Top
  147. obj4 = Instance.new("Part")
  148. obj4.CFrame = CFrame.new(Vector3.new(14.25, 3.8499999, 47.8999977)) * CFrame.Angles(0, 1.5707963705063, 0)
  149. obj4.TopSurface = Enum.SurfaceType.Smooth
  150. obj4.BottomSurface = Enum.SurfaceType.Smooth
  151. obj4.Material = Enum.Material.Neon
  152. obj4.Size = Vector3.new(0.200000003, 0.299999982, 0.300000012)
  153. obj4.Anchored = true
  154. obj4.Friction = 0.30000001192093
  155. obj4.Shape = Enum.PartType.Cylinder
  156. obj4.Name = "Top"
  157. obj4.CanCollide = false
  158. obj4.Parent = obj1
  159. obj4.Transparency = 0
  160.  
  161. -- 5 - Part
  162. obj5 = Instance.new("Part")
  163. obj5.CFrame = CFrame.new(Vector3.new(14.25, 3.35359001, 47.1499939)) * CFrame.Angles(-1.5707978010178, 0, -0)
  164. obj5.TopSurface = Enum.SurfaceType.Smooth
  165. obj5.BottomSurface = Enum.SurfaceType.Smooth
  166. obj5.Material = Enum.Material.Neon
  167. obj5.Size = Vector3.new(0.300000012, 0.200000003, 0.299999982)
  168. obj5.Anchored = true
  169.  
  170. obj5.Friction = 0.30000001192093
  171. obj5.Shape = Enum.PartType.Block
  172. obj5.CanCollide = false
  173. obj5.Parent = obj1
  174. obj5.Transparency = 0
  175.  
  176. -- 6 - Part
  177. obj6 = Instance.new("Part")
  178. obj6.CFrame = CFrame.new(Vector3.new(14.25, 3.5999999, 47.1499977)) * CFrame.Angles(-0, 0, -0)
  179. obj6.TopSurface = Enum.SurfaceType.Smooth
  180. obj6.BottomSurface = Enum.SurfaceType.Smooth
  181. obj6.Material = Enum.Material.Neon
  182. obj6.Size = Vector3.new(0.300000012, 0.200000003, 1.5)
  183. obj6.Anchored = true
  184. obj6.CanCollide = false
  185. obj6.Friction = 0.30000001192093
  186. obj6.Shape = Enum.PartType.Block
  187. obj6.Parent = obj1
  188. obj6.Transparency = 0
  189.  
  190. -- 7 - Part
  191. obj7 = Instance.new("Part")
  192. obj7.CFrame = CFrame.new(Vector3.new(14.25, 3.60000014, 47.8999977)) * CFrame.Angles(0, 1.5707963705063, 0)
  193. obj7.TopSurface = Enum.SurfaceType.Smooth
  194. obj7.BottomSurface = Enum.SurfaceType.Smooth
  195. obj7.Material = Enum.Material.Neon
  196. obj7.Size = Vector3.new(0.200000003, 0.200000003, 0.300000012)
  197. obj7.Anchored = true
  198. obj7.CanCollide = false
  199. obj7.Friction = 0.30000001192093
  200. obj7.Shape = Enum.PartType.Cylinder
  201. obj7.Parent = obj1
  202. obj7.Transparency = 0
  203.  
  204. -- 8 - Part
  205. obj8 = Instance.new("Part")
  206. obj8.CFrame = CFrame.new(Vector3.new(14.25, 3.15358996, 46.8499985)) * CFrame.Angles(1.1920913323138e-007, 0, -0)
  207. obj8.TopSurface = Enum.SurfaceType.Smooth
  208. obj8.BottomSurface = Enum.SurfaceType.Smooth
  209. obj8.Material = Enum.Material.Neon
  210. obj8.Size = Vector3.new(0.300000012, 0.200000003, 0.699999988)
  211. obj8.Anchored = true
  212. obj8.Friction = 0.30000001192093
  213. obj8.CanCollide = false
  214. obj8.Shape = Enum.PartType.Block
  215. obj8.Parent = obj1
  216. obj8.Transparency = 0
  217.  
  218. -- 9 - Part
  219. obj9 = Instance.new("Part")
  220. obj9.CFrame = CFrame.new(Vector3.new(14.25, 3.27858996, 46.5067024)) * CFrame.Angles(-1.0471963882446, 0, -0)
  221. obj9.TopSurface = Enum.SurfaceType.Smooth
  222. obj9.BottomSurface = Enum.SurfaceType.Smooth
  223. obj9.Material = Enum.Material.Neon
  224. obj9.Size = Vector3.new(0.300000012, 0.300000012, 0.699999988)
  225. obj9.Anchored = true
  226. obj9.CanCollide = false
  227. obj9.Friction = 0.30000001192093
  228. obj9.Shape = Enum.PartType.Block
  229. obj9.Parent = obj1
  230. obj9.Transparency = 0
  231.  
  232. local previous = nil
  233. for i,v in pairs(obj1:GetChildren()) do
  234. if v:IsA('BasePart') then
  235. if previous then
  236. local weld = Instance.new('Weld',v)
  237. weld.Part0 = v
  238. weld.Part1 = previous
  239. weld.C0 = v.CFrame:inverse() * previous.CFrame
  240. previous.Anchored = false
  241. end
  242. previous = v
  243. end
  244. end
  245. previous.Anchored = false
  246.  
  247. ---------------------------[[[ FUNCTIONS ]]]---------------------------
  248.  
  249. function notify(msg,forever)
  250. local doit = coroutine.wrap(function()
  251. for i,v in pairs(plr.PlayerGui:GetChildren()) do
  252. if v.Name == "Notification" and v:IsA('ScreenGui') then
  253. v:Destroy()
  254. end
  255. end
  256. print("Original Glock made by ???")
  257. print("Edited by Knowlton to make it heavy pow and rainbow I guess")
  258. local gui = Instance.new('ScreenGui',plr.PlayerGui)
  259. gui.Name = "Notification"
  260. local frame = Instance.new('Frame',gui)
  261. frame.Position = UDim2.new(0,0,0,0)
  262. frame.Size = UDim2.new(1,0,0.2,0)
  263. frame.BackgroundTransparency = 1
  264. local txt = Instance.new('TextLabel',frame)
  265. txt.TextColor3 = Color3.new(255,255,255)
  266. txt.TextStrokeColor3 = Color3.new(0, 0, 0)
  267. txt.TextStrokeTransparency = 0
  268. txt.BackgroundTransparency = 1
  269. txt.Text = ""
  270. txt.Size = UDim2.new(1,0,0.3,0)
  271. txt.Position = UDim2.new(0,0,0.4,0)
  272. txt.TextScaled = true
  273. txt.Font = "Code"
  274. txt.TextXAlignment = "Center"
  275. local tap = Instance.new("Sound")
  276. tap.Parent = plr.Backpack
  277. tap.SoundId = "rbxassetid://147982968"
  278. tap.TimePosition = 0.1
  279. local str = msg
  280. local len = string.len(str)
  281. for i=1,len do
  282. txt.Text = string.sub(str,1,i)
  283. local pitche = math.random(2, 4)
  284. tap.PlaybackSpeed = pitche
  285. tap:Play()
  286. wait(0.05)
  287. end
  288. if forever == false then
  289. wait(1)
  290. while txt.TextTransparency < 1 do
  291. txt.TextTransparency = txt.TextTransparency + 0.1
  292. txt.TextStrokeTransparency = txt.TextStrokeTransparency + 0.1
  293. wait()
  294. end
  295. gui:Destroy()
  296. end
  297. end)
  298. doit()
  299. end
  300.  
  301.  
  302. function damage(playa,hita)
  303. local hitz = hita.Name
  304. local heyy = hitz
  305. if hitz == "Right Arm" then
  306. local Limb = playa:FindFirstChild("Right Arm")
  307. local ters = playa:FindFirstChild('Torso')
  308. if Limb and ters then
  309. if ters:FindFirstChild('Right Shoulder') then ters["Right Shoulder"]:Destroy() end
  310. for i,v in pairs(Limb:GetChildren()) do
  311. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  312. v:Destroy()
  313. end
  314. end
  315. Limb.CFrame = ters.CFrame * CFrame.new(1.5, 0, 0)
  316. local Joint = Instance.new("Glue")
  317. Joint.Name = "RightShoulder"
  318. Joint.Part0 = ters
  319. Joint.Part1 = Limb
  320. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  321. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  322. Joint.Parent = ters
  323.  
  324. local B = Instance.new("Part")
  325. B.TopSurface = 0
  326. B.BottomSurface = 0
  327. B.formFactor = "Symmetric"
  328. B.Size = Vector3.new(1, 1, 1)
  329. B.Transparency = 1
  330. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  331. B.Parent = playa
  332. local W = Instance.new("Weld")
  333. W.Part0 = Limb
  334. W.Part1 = B
  335. W.C0 = CFrame.new(0, -0.5, 0)
  336. W.Parent = Limb
  337. end
  338. elseif hitz == "Left Arm" then
  339. local Limb = playa:FindFirstChild("Left Arm")
  340. local ters = playa:FindFirstChild('Torso')
  341. if Limb and ters then
  342. if ters:FindFirstChild('Left Shoulder') then ters["Left Shoulder"]:Destroy() end
  343. for i,v in pairs(Limb:GetChildren()) do
  344. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  345. v:Destroy()
  346. end
  347. end
  348. Limb.CFrame = ters.CFrame * CFrame.new(-1.5, 0, 0)
  349. local Joint = Instance.new("Glue")
  350. Joint.Name = "LeftShoulder"
  351. Joint.Part0 = ters
  352. Joint.Part1 = Limb
  353. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  354. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  355. Joint.Parent = ters
  356. local B = Instance.new("Part")
  357. B.TopSurface = 0
  358. B.BottomSurface = 0
  359. B.formFactor = "Symmetric"
  360. B.Size = Vector3.new(1, 1, 1)
  361. B.Transparency = 1
  362. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  363. B.Parent = playa
  364. local W = Instance.new("Weld")
  365. W.Part0 = ters
  366. W.Part1 = B
  367. W.C0 = CFrame.new(0, -0.5, 0)
  368. W.Parent = Limb
  369. end
  370. elseif hitz == "Right Leg" then
  371. local Limb = playa:FindFirstChild("Right Leg")
  372. local ters = playa:FindFirstChild('Torso')
  373. if Limb and ters then
  374. if ters:FindFirstChild('Right Hip') then ters["Right Hip"]:Destroy() end
  375. for i,v in pairs(Limb:GetChildren()) do
  376. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  377. v:Destroy()
  378. end
  379. end
  380. Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0)
  381. local Joint = Instance.new("Glue")
  382. Joint.Name = "Right Hip"
  383. Joint.Part0 = ters
  384. Joint.Part1 = Limb
  385. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  386. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  387. Joint.Parent = ters
  388. local B = Instance.new("Part")
  389. B.TopSurface = 0
  390. B.BottomSurface = 0
  391. B.formFactor = "Symmetric"
  392. B.Size = Vector3.new(1, 1, 1)
  393. B.Transparency = 1
  394. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  395. B.Parent = playa
  396. local W = Instance.new("Weld")
  397. W.Part0 = Limb
  398. W.Part1 = B
  399. W.C0 = CFrame.new(0, -0.5, 0)
  400. W.Parent = Limb
  401. if playa:FindFirstChildOfClass('Humanoid') then
  402. local hum = playa:FindFirstChildOfClass('Humanoid')
  403. local target = playa
  404. if target:FindFirstChild('HumanoidRootPart') then
  405. target.HumanoidRootPart:Destroy()
  406. end
  407. local found = false
  408. for i,v in pairs(stunneds) do
  409. if v == hum then
  410. found = true
  411. end
  412. end
  413. if found == false then
  414. table.insert(stunneds,hum)
  415. end
  416. end
  417. end
  418. elseif hitz == "Left Leg" then
  419. local Limb = playa:FindFirstChild("Left Leg")
  420. local ters = playa:FindFirstChild('Torso')
  421. if Limb and ters then
  422. if ters:FindFirstChild('Left Hip') then ters["Left Hip"]:Destroy() end
  423. for i,v in pairs(Limb:GetChildren()) do
  424. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  425. v:Destroy()
  426. end
  427. end
  428. Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0)
  429. Limb.CFrame = ters.CFrame * CFrame.new(-0.5, -2, 0)
  430. local Joint = Instance.new("Glue")
  431. Joint.Name = "LeftHip"
  432. Joint.Part0 = ters
  433. Joint.Part1 = Limb
  434. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  435. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  436. Joint.Parent = ters
  437.  
  438. local B = Instance.new("Part")
  439. B.TopSurface = 0
  440. B.BottomSurface = 0
  441. B.formFactor = "Symmetric"
  442. B.Size = Vector3.new(1, 1, 1)
  443. B.Transparency = 1
  444. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  445. B.Parent = playa
  446. local W = Instance.new("Weld")
  447. W.Part0 = Limb
  448. W.Part1 = B
  449. W.C0 = CFrame.new(0, -0.5, 0)
  450. W.Parent = Limb
  451. Limb.CanCollide = false
  452. if playa:FindFirstChildOfClass('Humanoid') then
  453. local hum = playa:FindFirstChildOfClass('Humanoid')
  454. local target = playa
  455. if target:FindFirstChild('HumanoidRootPart') then
  456. target.HumanoidRootPart:Destroy()
  457. end
  458. local found = false
  459. for i,v in pairs(stunneds) do
  460. if v == hum then
  461. found = true
  462. end
  463. end
  464. if found == false then
  465. table.insert(stunneds,hum)
  466. end
  467. end
  468. end
  469. else
  470. local playa2 = playa
  471. playa.Archivable = true
  472. local playa = playa:Clone()
  473. playa.Archivable = false
  474. playa2:Destroy()
  475. playa.Parent = workspace
  476. local Gibs = game.Workspace
  477. print(playa)
  478. local Torso = playa.Torso
  479. local Head = playa:FindFirstChild("Head")
  480. local function Scan(ch)
  481. local e
  482. for e = 1,#ch do
  483. Scan(ch[e]:GetChildren())
  484. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  485. ch[e]:remove()
  486. end
  487. end
  488. end
  489. Scan(playa:GetChildren())
  490. if playa:FindFirstChild('HumanoidRootPart') then
  491. playa:FindFirstChild('HumanoidRootPart'):Destroy()
  492. end
  493. local hum2 = playa:FindFirstChildOfClass("Humanoid")
  494.  
  495.  
  496. if hum2 ~= nil then
  497. hum2.Name = "Humanoid2"
  498. hum2.PlatformStand = true
  499. hum2.Health = 0
  500. end
  501. local ch = playa:GetChildren()
  502. local i
  503. for i = 1,#ch do
  504. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  505. ch[i]:remove()
  506. end
  507. end
  508.  
  509. if Head then
  510. local Neck = Instance.new("Weld")
  511. Neck.Name = "Neck"
  512. Neck.Part0 = Torso
  513. Neck.Part1 = Head
  514. Neck.C0 = CFrame.new(0, 1.5, 0)
  515. Neck.C1 = CFrame.new()
  516. Neck.Parent = Torso
  517. end
  518. local Limb = playa:FindFirstChild("Right Arm")
  519. if Limb then
  520.  
  521. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  522. local Joint = Instance.new("Glue")
  523. Joint.Name = "RightShoulder"
  524. Joint.Part0 = Torso
  525. Joint.Part1 = Limb
  526. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  527. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  528. Joint.Parent = Torso
  529.  
  530. local B = Instance.new("Part")
  531. B.TopSurface = 0
  532. B.BottomSurface = 0
  533. B.formFactor = "Symmetric"
  534. B.Size = Vector3.new(1, 1, 1)
  535. B.Transparency = 1
  536. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  537. B.Parent = playa
  538. local W = Instance.new("Weld")
  539. W.Part0 = Limb
  540. W.Part1 = B
  541. W.C0 = CFrame.new(0, -0.5, 0)
  542. W.Parent = Limb
  543. end
  544. local Limb = playa:FindFirstChild("Left Arm")
  545. if Limb then
  546.  
  547. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  548. local Joint = Instance.new("Glue")
  549. Joint.Name = "LeftShoulder"
  550. Joint.Part0 = Torso
  551. Joint.Part1 = Limb
  552. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  553. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  554. Joint.Parent = Torso
  555.  
  556. local B = Instance.new("Part")
  557. B.TopSurface = 0
  558. B.BottomSurface = 0
  559. B.formFactor = "Symmetric"
  560. B.Size = Vector3.new(1, 1, 1)
  561. B.Transparency = 1
  562. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  563. B.Parent = playa
  564. local W = Instance.new("Weld")
  565. W.Part0 = Limb
  566. W.Part1 = B
  567. W.C0 = CFrame.new(0, -0.5, 0)
  568. W.Parent = Limb
  569. end
  570. local Limb = playa:FindFirstChild("Right Leg")
  571. if Limb then
  572.  
  573. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  574. local Joint = Instance.new("Glue")
  575. Joint.Name = "RightHip"
  576. Joint.Part0 = Torso
  577. Joint.Part1 = Limb
  578. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  579. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  580. Joint.Parent = Torso
  581.  
  582. local B = Instance.new("Part")
  583. B.TopSurface = 0
  584. B.BottomSurface = 0
  585. B.formFactor = "Symmetric"
  586. B.Size = Vector3.new(1, 1, 1)
  587. B.Transparency = 1
  588. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  589. B.Parent = playa
  590. local W = Instance.new("Weld")
  591. W.Part0 = Limb
  592. W.Part1 = B
  593. W.C0 = CFrame.new(0, -0.5, 0)
  594. W.Parent = Limb
  595. end
  596. local Limb = playa:FindFirstChild("Left Leg")
  597. if Limb then
  598.  
  599. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  600. local Joint = Instance.new("Glue")
  601. Joint.Name = "LeftHip"
  602. Joint.Part0 = Torso
  603. Joint.Part1 = Limb
  604. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  605. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  606. Joint.Parent = Torso
  607.  
  608. local B = Instance.new("Part")
  609. B.TopSurface = 0
  610. B.BottomSurface = 0
  611. B.formFactor = "Symmetric"
  612. B.Size = Vector3.new(1, 1, 1)
  613. B.Transparency = 1
  614. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  615. B.Parent = playa
  616. local W = Instance.new("Weld")
  617. W.Part0 = Limb
  618. W.Part1 = B
  619. W.C0 = CFrame.new(0, -0.5, 0)
  620. W.Parent = Limb
  621. end
  622. --[
  623. local Bar = Instance.new("Part")
  624. Bar.TopSurface = 0
  625. Bar.BottomSurface = 0
  626. Bar.formFactor = "Symmetric"
  627. Bar.Size = Vector3.new(1, 1, 1)
  628. Bar.Transparency = 1
  629. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  630. Bar.Parent = playa
  631. local Weld = Instance.new("Weld")
  632. Weld.Part0 = Torso
  633. Weld.Part1 = Bar
  634. Weld.C0 = CFrame.new(0, 0.5, 0)
  635. Weld.Parent = Torso
  636. --]]
  637. playa.Parent = Gibs
  638. game.Debris:AddItem(playa, 12)
  639. end
  640. end
  641.  
  642.  
  643. function calculate()
  644. if leftarm and chr:FindFirstChild('Head') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild("Left Shoulder") and chr:FindFirstChild('Left Arm') then
  645. local Head = plr.Character.Head
  646. local RightShoulder = plr.Character.Torso["Left Shoulder"]
  647. local RightArm = plr.Character["Left Arm"]
  648. local MousePosition = mou.Hit.p
  649. local ToMouse = (MousePosition - Head.Position).unit
  650. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  651. 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)))
  652. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(-1 ,0, -1)).unit
  653. local Look = (Head.CFrame.lookVector * Vector3.new(-1, 0, -1)).unit
  654. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  655. if tostring(LateralAngle) == "-1.#IND" then
  656. LateralAngle = 0
  657. end
  658. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  659. --[[
  660. if LateralAngle > (math.pi / 2) then
  661. LateralAngle = (math.pi / 2)
  662. if chr:FindFirstChild('Torso') then
  663. local Torso = chr.Torso
  664. local Point = Torso.CFrame:vectorToObjectSpace(mou.Hit.p-Torso.CFrame.p)
  665. if Point.Z > 0 then
  666. if Point.X > 0 then
  667. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  668. elseif Point.X < 0 then
  669. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  670. end
  671. end
  672. end
  673. end
  674. ]]--
  675. print(LateralAngle)
  676. warn(math.pi / 2)
  677. if Cross.Y < 0 then
  678. LateralAngle = -LateralAngle
  679. end
  680. return(CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  681. elseif chr:FindFirstChild('Head') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild("Right Shoulder") and chr:FindFirstChild('Right Arm') then
  682. local Head = plr.Character.Head
  683. local RightShoulder = plr.Character.Torso["Right Shoulder"]
  684. local RightArm = plr.Character["Right Arm"]
  685. local MousePosition = mou.Hit.p
  686. local ToMouse = (MousePosition - Head.Position).unit
  687. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  688. 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)))
  689. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  690. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  691. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  692. if tostring(LateralAngle) == "-1.#IND" then
  693. LateralAngle = 0
  694. end
  695. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  696. if LateralAngle > (math.pi / 2) then
  697. LateralAngle = (math.pi / 2)
  698. if chr:FindFirstChild('Torso') then
  699. local Torso = chr.Torso
  700. local Point = Torso.CFrame:vectorToObjectSpace(mou.Hit.p-Torso.CFrame.p)
  701. if Point.Z > 0 then
  702. if Point.X > 0 then
  703. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  704. elseif Point.X < 0 then
  705. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  706. end
  707. end
  708. end
  709. end
  710. if Cross.Y < 0 then
  711. LateralAngle = -LateralAngle
  712. end
  713. return(CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  714. end
  715. end
  716.  
  717. function fire()
  718. if mou.Target then
  719. local humanoid = mou.Target.Parent:FindFirstChildOfClass("Humanoid")
  720. if not humanoid then
  721. humanoid = mou.Target.Parent.Parent:FindFirstChildOfClass("Humanoid")
  722. end
  723. if humanoid then
  724. local coru = coroutine.wrap(function()
  725. damage(humanoid.Parent,mou.Target)
  726. end)
  727. coru()
  728. end
  729. end
  730. local beam = Instance.new("Part", workspace)
  731. beam.BrickColor = BrickColor.random()
  732. beam.FormFactor = "Custom"
  733. beam.Material = "Neon"
  734. beam.Transparency = 0
  735. beam.Anchored = true
  736. beam.Locked = true
  737. beam.CanCollide = false
  738. local distance = (obj4.CFrame.p - mou.Hit.p).magnitude
  739. beam.Size = Vector3.new(0.2, 0.2, distance)
  740. beam.CFrame = CFrame.new(obj4.CFrame.p, mou.Hit.p) * CFrame.new(0, 0, -distance / 2)
  741. game:GetService("Debris"):AddItem(beam, 0.05)
  742. local sound = Instance.new('Sound',obj4)
  743. sound.SoundId = 'rbxassetid://135362176'
  744. sound.Volume = 8
  745. sound.EmitterSize = 40
  746. sound.MaxDistance = 450
  747. sound:Play()
  748. game:GetService("Debris"):AddItem(beam, sound.TimeLength)
  749. end
  750.  
  751.  
  752. ---------------------------[[[ SCRIPT ]]]---------------------------
  753. CFuncs = {
  754. ["Part"] = {
  755. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size )
  756. local Part = Create("Part"){
  757. Parent = Parent,
  758. Reflectance = Reflectance,
  759. Transparency = Transparency,
  760. CanCollide = false,
  761. Locked = true,
  762. BrickColor = BrickColor.random(),
  763. Name = Name,
  764. Size = Size,
  765. Material = Material,
  766. }
  767. RemoveOutlines(Part)
  768. return Part
  769. end;
  770. };
  771.  
  772. ["Mesh"] = {
  773. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  774. local Msh = Create(Mesh){
  775. Parent = Part,
  776. Offset = OffSet,
  777. Scale = Scale,
  778. }
  779. if Mesh == "SpecialMesh" then
  780. Msh.MeshType = MeshType
  781. Msh.MeshId = MeshId
  782. end
  783. return Msh
  784. end;
  785. };
  786.  
  787. ["Mesh"] = {
  788. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  789. local Msh = Create(Mesh){
  790. Parent = Part,
  791. Offset = OffSet,
  792. Scale = Scale,
  793. }
  794. if Mesh == "SpecialMesh" then
  795. Msh.MeshType = MeshType
  796. Msh.MeshId = MeshId
  797. end
  798. return Msh
  799. end;
  800. };
  801.  
  802. ["Weld"] = {
  803. Create = function(Parent, Part0, Part1, C0, C1)
  804. local Weld = Create("Weld"){
  805. Parent = Parent,
  806. Part0 = Part0,
  807. Part1 = Part1,
  808. C0 = C0,
  809. C1 = C1,
  810. }
  811. return Weld
  812. end;
  813. };
  814.  
  815. ["Sound"] = {
  816. Create = function(id, par, vol, pit)
  817. coroutine.resume(coroutine.create(function()
  818. local S = Create("Sound"){
  819. Volume = vol,
  820. Pitch = pit or 1,
  821. SoundId = id,
  822. Parent = par or workspace,
  823. }
  824. wait()
  825. S:play()
  826. game:GetService("Debris"):AddItem(S, 6)
  827. end))
  828. end;
  829. };
  830.  
  831. ["ParticleEmitter"] = {
  832. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  833. local fp = Create("ParticleEmitter"){
  834. Parent = Parent,
  835. Color = ColorSequence.new(Color1, Color2),
  836. LightEmission = LightEmission,
  837. Size = Size,
  838. Texture = Texture,
  839. Transparency = Transparency,
  840. ZOffset = ZOffset,
  841. Acceleration = Accel,
  842. Drag = Drag,
  843. LockedToPart = LockedToPart,
  844. VelocityInheritance = VelocityInheritance,
  845. EmissionDirection = EmissionDirection,
  846. Enabled = Enabled,
  847. Lifetime = LifeTime,
  848. Rate = Rate,
  849. Rotation = Rotation,
  850. RotSpeed = RotSpeed,
  851. Speed = Speed,
  852. VelocitySpread = VelocitySpread,
  853. }
  854. return fp
  855. end;
  856. };
  857.  
  858. CreateTemplate = {
  859.  
  860. };
  861. }
  862.  
  863. sound = Instance.new("Sound", Character)
  864. sound.SoundId = "rbxassetid://362573120"
  865. sound.Volume = 6
  866. sound.Pitch = 1.2
  867. sound.EmitterSize = 100
  868. sound:Play()
  869. sound.Looped = true
  870. if chr:FindFirstChild('Left Arm') == nil or chr:FindFirstChild('Torso') == nil or chr.Torso:FindFirstChild('Left Shoulder') == nil then
  871. leftarm = false
  872. end
  873. local weldas = Instance.new('Weld',obj2)
  874. if leftarm and chr:FindFirstChild('Left Arm') then
  875. weldas.Part0 = obj2
  876. weldas.Part1 = chr["Left Arm"]
  877. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  878. elseif chr:FindFirstChild('Right Arm') then
  879. weldas.Part0 = obj2
  880. weldas.Part1 = chr["Right Arm"]
  881. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  882. end
  883.  
  884.  
  885. if leftarm and chr:FindFirstChild('Left Arm') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild('Left Shoulder') then
  886. chr:FindFirstChild('Left Arm').AncestryChanged:connect(function(me,par)
  887. if par ~= chr and chr:FindFirstChild('Right Arm') then
  888. if obj2 and obj2:FindFirstChildOfClass('Weld') then
  889. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  890. end
  891. leftarm = false
  892. end
  893. end)
  894. chr.Torso:FindFirstChild('Left Shoulder').AncestryChanged:connect(function(me,par)
  895. if par ~= chr:FindFirstChild('Torso') and chr:FindFirstChild('Right Arm') then
  896. if obj2 and obj2:FindFirstChildOfClass('Weld') then
  897. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  898. end
  899. end
  900. leftarm = false
  901. end)
  902. elseif leftarm then
  903. if obj2 and obj2:FindFirstChildOfClass('Weld') and chr:FindFirstChild('Right Arm') then
  904. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  905. end
  906. end
  907.  
  908. mou.KeyDown:connect(function(key)
  909. if key == string.lower(curkey) then
  910. active = not active
  911. end
  912. end)
  913.  
  914. plr.Chatted:connect(function(msg)
  915. if string.lower(string.sub(msg,1,5)) == "!bind" then
  916. curkey = string.lower(string.sub(msg,7,7))
  917. notify([[Changed key for equip/unequip to "]]..curkey..[[".]],false)
  918. end
  919. end)
  920.  
  921. game:GetService('RunService').Stepped:connect(function()
  922. if active and chr:FindFirstChild('Torso') then
  923. if leftarm then
  924. chr.Torso["Left Shoulder"].C0 = calculate()
  925. else
  926. chr.Torso["Right Shoulder"].C0 = calculate()
  927. end
  928. weldas.Part1 = chr["Right Arm"]
  929. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  930. elseif chr:FindFirstChild('Torso') and (chr.Torso:FindFirstChild('Left Shoulder') or chr.Torso:FindFirstChild('Right Shoulder')) then
  931. if leftarm then
  932. chr.Torso["Left Shoulder"].C0 = CFrame.new(-1,0.5,0)*CFrame.Angles(0,-math.pi/2,0)
  933. else
  934. chr.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.pi/2,0)
  935. end
  936. weldas.Part1 = chr.Torso
  937. weldas.C0 = CFrame.new(-1,0,-1)*CFrame.Angles(math.rad(-90),0,0)
  938. end
  939. for i,v in pairs(stunneds) do
  940. v.PlatformStand = true
  941. end
  942. end)
  943.  
  944. mou.Button1Down:connect(function()
  945. if active then
  946. fire()
  947. end
  948. end)
  949. print("Original Glock made by ???")
  950. print("Edited by Knowlton to make it heavy pow and rainbow I guess")
  951. ---------------
  952. while true do
  953. obj2.BrickColor = BrickColor.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  954. obj3.BrickColor = BrickColor.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  955. obj4.BrickColor = BrickColor.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  956. obj5.BrickColor = BrickColor.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  957. obj6.BrickColor = BrickColor.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  958. obj7.BrickColor = BrickColor.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  959. obj8.BrickColor = BrickColor.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  960. obj9.BrickColor = BrickColor.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  961. wait(0.1)
  962. ----------------
  963. end
  964. notify([["Press "f" to equip/unequip, now start powing."]],false)
Add Comment
Please, Sign In to add comment