Advertisement
Bendy928443534

Untitled

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