Advertisement
JacksoMykalJunior

Banisher Rainbow [FE]

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