Advertisement
ManOhMan

Untitled

Sep 29th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.72 KB | None | 0 0
  1. --Created with PenguinAnonymous's compiler
  2. --PenguinAnonymous is not responsible for damages caused to your game
  3. --This plugin does not remove things
  4. --PenguinAnonymous cannot be held resonsible for manual deletion for the purpose of testing
  5. --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
  6. --Thank you for using my plugin and enjoy :)
  7. --It is free to use
  8. --If you use this plugin to create your own, please give me credit
  9. --Z_V edited my plugin to look like his own and published it without giving me credit, and that makes me very angry
  10. --Errors: TouchTransmitter,ModuleScript
  11. local runDummyScript = function(f,scri)
  12. local oldenv = getfenv(f)
  13. local newenv = setmetatable({}, {
  14. __index = function(_, k)
  15. if k:lower() == 'script' then
  16. return scri
  17. else
  18. return oldenv[k]
  19. end
  20. end
  21. })
  22. setfenv(f, newenv)
  23. ypcall(function() f() end)
  24. end
  25. cors = {}
  26. mas = Instance.new("Model",game:GetService("Lighting"))
  27. mas.Name = "CompiledModel"
  28. o1 = Instance.new("Tool")
  29. o2 = Instance.new("Part")
  30. o3 = Instance.new("SpecialMesh")
  31. o5 = Instance.new("Script")
  32. o6 = Instance.new("Sound")
  33. o7 = Instance.new("Sound")
  34. o8 = Instance.new("Script")
  35. o9 = Instance.new("LocalScript")
  36. o10 = Instance.new("Configuration")
  37. o11 = Instance.new("NumberValue")
  38. o12 = Instance.new("IntValue")
  39. o13 = Instance.new("NumberValue")
  40. o14 = Instance.new("IntValue")
  41. o15 = Instance.new("IntValue")
  42. o16 = Instance.new("IntValue")
  43. o1.Name = "RocketLauncher"
  44. o1.Parent = mas
  45. o1.TextureId = "http://www.roblox.com/asset/?id=90021376"
  46. o1.GripForward = Vector3.new(1, -0, -0)
  47. o1.GripPos = Vector3.new(0.699999988, 0, -0.5)
  48. o1.GripRight = Vector3.new(0, -1, 0)
  49. o1.GripUp = Vector3.new(0, 0, 1)
  50. o1.CanBeDropped = false
  51. o2.Name = "Handle"
  52. o2.Parent = o1
  53. o2.Position = Vector3.new(-13.7354164, 0.420024008, -68.8795471)
  54. o2.Rotation = Vector3.new(-90, 0, 0)
  55. o2.FormFactor = Enum.FormFactor.Custom
  56. o2.Size = Vector3.new(4.92000628, 0.740000546, 0.839999795)
  57. o2.CFrame = CFrame.new(-13.7354164, 0.420024008, -68.8795471, 1, 0, 0, 0, 6.30170107e-05, 1.00000024, 0, -1.00000024, 6.30170107e-05)
  58. o2.BottomSurface = Enum.SurfaceType.Smooth
  59. o2.TopSurface = Enum.SurfaceType.Smooth
  60. o2.Position = Vector3.new(-13.7354164, 0.420024008, -68.8795471)
  61. o3.Parent = o2
  62. o3.MeshId = "rbxasset://fonts/rocketlauncher.mesh"
  63. o3.Scale = Vector3.new(0.75, 0.75, 0.75)
  64. o3.TextureId = "rbxasset://textures/rocketlaunchertex.png"
  65. o3.MeshType = Enum.MeshType.FileMesh
  66. o5.Parent = o1
  67. table.insert(cors,coroutine.create(function()
  68. wait()
  69. runDummyScript(function()
  70. local tool = script.Parent
  71. local canFire = true
  72. local gunWeld
  73.  
  74. -----------------
  75. --| Constants |--
  76. -----------------
  77.  
  78. local GRAVITY_ACCELERATION = 196.2
  79.  
  80. local RELOAD_TIME = tool.Configurations.ReloadTime.Value -- Seconds until tool can be used again
  81. local ROCKET_SPEED = tool.Configurations.RocketSpeed.Value -- Speed of the projectile
  82.  
  83. local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534'
  84. local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25)
  85. local ROCKET_PART_SIZE = Vector3.new(1.2, 1.2, 3.27)
  86.  
  87. local RocketScript = script:WaitForChild('Rocket')
  88. local SwooshSound = script:WaitForChild('Swoosh')
  89. local BoomSound = script:WaitForChild('Boom')
  90.  
  91. local attackCooldown = tool.Configurations.AttackCooldown.Value
  92. local damage = tool.Configurations.Damage.Value
  93. local reloadTime = tool.Configurations.ReloadTime.Value
  94.  
  95. local function createEvent(eventName)
  96. local event = game.ReplicatedStorage:FindFirstChild(eventName)
  97. if not event then
  98. event = Instance.new("RemoteEvent", game.ReplicatedStorage)
  99. event.Name = eventName
  100. end
  101. return event
  102. end
  103.  
  104. local updateEvent = createEvent("ROBLOX_RocketUpdateEvent")
  105. local equipEvent = createEvent("ROBLOX_RocketEquipEvent")
  106. local unequipEvent = createEvent("ROBLOX_RocketUnequipEvent")
  107. local fireEvent = createEvent("ROBLOX_RocketFireEvent")
  108.  
  109. updateEvent.OnServerEvent:connect(function(player, neckC0, rshoulderC0)
  110. local character = player.Character
  111. local humanoid = character.Humanoid
  112.  
  113. if humanoid.Health <= 0 then return end
  114.  
  115. if humanoid.RigType == Enum.HumanoidRigType.R6 then
  116. character.Torso.Neck.C0 = neckC0
  117. character.Torso:FindFirstChild("Right Shoulder").C0 = rshoulderC0
  118. gunWeld = character:FindFirstChild("Right Arm"):WaitForChild("RightGrip")
  119.  
  120. elseif humanoid.RigType == Enum.HumanoidRigType.R15 then
  121. character.Head.Neck.C0 = neckC0
  122. character.RightUpperArm.RightShoulder.C0 = rshoulderC0
  123. gunWeld = character.RightHand:WaitForChild("RightGrip")
  124. end
  125. end)
  126.  
  127. equipEvent.OnServerEvent:connect(function(player)
  128. player.Character.Humanoid.AutoRotate = false
  129. end)
  130.  
  131. unequipEvent.OnServerEvent:connect(function(player)
  132. player.Character.Humanoid.AutoRotate = true
  133. end)
  134.  
  135. --NOTE: We create the rocket once and then clone it when the player fires
  136. local Rocket = Instance.new('Part') do
  137. -- Set up the rocket part
  138. Rocket.Name = 'Rocket'
  139. Rocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size
  140. Rocket.Size = ROCKET_PART_SIZE
  141. Rocket.CanCollide = false
  142.  
  143. -- Add the mesh
  144. local mesh = Instance.new('SpecialMesh', Rocket)
  145. mesh.MeshId = MISSILE_MESH_ID
  146. mesh.Scale = MISSILE_MESH_SCALE
  147.  
  148. -- Add fire
  149. local fire = Instance.new('Fire', Rocket)
  150. fire.Heat = 5
  151. fire.Size = 2
  152.  
  153. -- Add a force to counteract gravity
  154. local bodyForce = Instance.new('BodyForce', Rocket)
  155. bodyForce.Name = 'Antigravity'
  156. bodyForce.force = Vector3.new(0, Rocket:GetMass() * GRAVITY_ACCELERATION, 0)
  157.  
  158. -- Clone the sounds and set Boom to PlayOnRemove
  159. local swooshSoundClone = SwooshSound:Clone()
  160. swooshSoundClone.Parent = Rocket
  161. local boomSoundClone = BoomSound:Clone()
  162. boomSoundClone.PlayOnRemove = true
  163. boomSoundClone.Parent = Rocket
  164.  
  165. -- Finally, clone the rocket script and enable it
  166. -- local rocketScriptClone = RocketScript:Clone()
  167. -- rocketScriptClone.Parent = Rocket
  168. -- rocketScriptClone.Disabled = false
  169. end
  170.  
  171.  
  172. fireEvent.OnServerEvent:connect(function(player, target)
  173. if canFire and player.Character == tool.Parent then
  174. canFire = false
  175.  
  176. -- Create a clone of Rocket and set its color
  177. local rocketClone = Rocket:Clone()
  178. --game.Debris:AddItem(rocketClone, 30)
  179. rocketClone.BrickColor = player.TeamColor
  180. rocketClone.Touched:connect(function(hit)
  181. if hit and hit.Parent and hit.Parent ~= player.Character and hit.Parent ~= tool then
  182. local explosion = Instance.new("Explosion", game.Workspace)
  183. explosion.Position = rocketClone.Position
  184. rocketClone:Destroy()
  185. end
  186. end)
  187.  
  188. spawn(function()
  189. wait(30)
  190. if rocketClone then rocketClone:Destroy() end
  191. end)
  192.  
  193. -- Position the rocket clone and launch!
  194. local spawnPosition = (tool.Handle.CFrame * CFrame.new(2, 0, 0)).p
  195. rocketClone.CFrame = CFrame.new(spawnPosition, target) --NOTE: This must be done before assigning Parent
  196. rocketClone.Velocity = rocketClone.CFrame.lookVector * ROCKET_SPEED --NOTE: This should be done before assigning Parent
  197. rocketClone.Parent = game.Workspace
  198.  
  199. -- Attach creator tags to the rocket early on
  200. local creatorTag = Instance.new('ObjectValue', rocketClone)
  201. creatorTag.Value = player
  202. creatorTag.Name = 'creator' --NOTE: Must be called 'creator' for website stats
  203. local iconTag = Instance.new('StringValue', creatorTag)
  204. iconTag.Value = tool.TextureId
  205. iconTag.Name = 'icon'
  206.  
  207. delay(attackCooldown, function()
  208. canFire = true
  209. end)
  210. end
  211. end)
  212. end,o5)
  213. end))
  214. o6.Name = "Boom"
  215. o6.Parent = o5
  216. o6.SoundId = "rbxasset://sounds/collide.wav"
  217. o6.Volume = 1
  218. o7.Name = "Swoosh"
  219. o7.Parent = o5
  220. o7.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
  221. o7.Volume = 0.69999998807907
  222. o7.Looped = true
  223. o8.Name = "Rocket"
  224. o8.Parent = o5
  225. table.insert(cors,coroutine.create(function()
  226. wait()
  227. runDummyScript(function()
  228. -----------------
  229. --| Constants |--
  230. -----------------
  231. local BLAST_RADIUS = script.Parent.Parent.Configurations.BlastRadius.Value -- Blast radius of the explosion
  232. local BLAST_DAMAGE = script.Parent.Parent.Configurations.Damage.Value -- Amount of damage done to players
  233. local BLAST_FORCE = script.Parent.Parent.Configurations.BlastForce.Value -- Amount of force applied to parts
  234.  
  235. local IGNORE_LIST = {rocket = 1, handle = 1, effect = 1, water = 1} -- Rocket will fly through things named these
  236. --NOTE: Keys must be lowercase, values must evaluate to true
  237.  
  238. -----------------
  239. --| Variables |--
  240. -----------------
  241.  
  242. local DebrisService = game:GetService('Debris')
  243. local PlayersService = game:GetService('Players')
  244.  
  245. local Rocket = script.Parent
  246.  
  247. local CreatorTag = Rocket:WaitForChild('creator', 60)
  248. local SwooshSound = Rocket:WaitForChild('Swoosh', 60)
  249.  
  250. -----------------
  251. --| Functions |--
  252. -----------------
  253.  
  254. -- Removes any old creator tags and applies a new one to the target
  255. local function ApplyTags(target)
  256. while target:FindFirstChild('creator') do
  257. target.creator:Destroy()
  258. end
  259.  
  260. local creatorTagClone = CreatorTag:Clone()
  261. DebrisService:AddItem(creatorTagClone, 1.5)
  262. creatorTagClone.Parent = target
  263. end
  264.  
  265. -- Returns the ancestor that contains a Humanoid, if it exists
  266. local function FindCharacterAncestor(subject)
  267. if subject and subject ~= game.Workspace then
  268. local humanoid = subject:FindFirstChild('Humanoid')
  269. if humanoid then
  270. return subject, humanoid
  271. else
  272. return FindCharacterAncestor(subject.Parent)
  273. end
  274. end
  275. return nil
  276. end
  277.  
  278. -- Customized explosive effect that doesn't affect teammates and only breaks joints on dead parts
  279. local function OnExplosionHit(hitPart, hitDistance, blastCenter)
  280. if hitPart and hitDistance then
  281. local character, humanoid = FindCharacterAncestor(hitPart.Parent)
  282.  
  283. if character then
  284. local myPlayer = CreatorTag.Value
  285. if myPlayer and not myPlayer.Neutral then -- Ignore friendlies caught in the blast
  286. local player = PlayersService:GetPlayerFromCharacter(character)
  287. if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then
  288. return
  289. end
  290. end
  291. end
  292.  
  293. if humanoid and humanoid.Health > 0 then -- Humanoids are tagged and damaged
  294. if hitPart.Name == 'Torso' then
  295. ApplyTags(humanoid)
  296. humanoid:TakeDamage(BLAST_DAMAGE)
  297. end
  298. else -- Loose parts and dead parts are blasted
  299. if hitPart.Name ~= 'Handle' then
  300. hitPart:BreakJoints()
  301. local blastForce = Instance.new('BodyForce', hitPart) --NOTE: We will multiply by mass so bigger parts get blasted more
  302. blastForce.force = (hitPart.Position - blastCenter).unit * BLAST_FORCE * hitPart:GetMass()
  303. DebrisService:AddItem(blastForce, 0.1)
  304. end
  305. end
  306. end
  307. end
  308.  
  309. local function OnTouched(otherPart)
  310. if Rocket and otherPart then
  311. -- Fly through anything in the ignore list
  312. if IGNORE_LIST[string.lower(otherPart.Name)] then
  313. return
  314. end
  315.  
  316. local myPlayer = CreatorTag.Value
  317. if myPlayer then
  318. -- Fly through the creator
  319. if myPlayer.Character and myPlayer.Character:IsAncestorOf(otherPart) then
  320. return
  321. end
  322.  
  323. -- Fly through friendlies
  324. if not myPlayer.Neutral then
  325. local character = FindCharacterAncestor(otherPart.Parent)
  326. local player = PlayersService:GetPlayerFromCharacter(character)
  327. if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then
  328. return
  329. end
  330. end
  331. end
  332.  
  333. -- Fly through terrain water
  334. if otherPart == game.Workspace.Terrain then
  335. --NOTE: If the rocket is large, then the simplifications made here will cause it to fly through terrain in some cases
  336. local frontOfRocket = Rocket.Position + (Rocket.CFrame.lookVector * (Rocket.Size.Z / 2))
  337. local cellLocation = game.Workspace.Terrain:WorldToCellPreferSolid(frontOfRocket)
  338. local cellMaterial = game.Workspace.Terrain:GetCell(cellLocation.X, cellLocation.Y, cellLocation.Z)
  339. if cellMaterial == Enum.CellMaterial.Water or cellMaterial == Enum.CellMaterial.Empty then
  340. return
  341. end
  342. end
  343.  
  344. -- Create the explosion
  345. local explosion = Instance.new('Explosion')
  346. explosion.BlastPressure = 0 -- Completely safe explosion
  347. explosion.BlastRadius = BLAST_RADIUS
  348. explosion.ExplosionType = Enum.ExplosionType.NoCraters
  349. explosion.Position = Rocket.Position
  350. explosion.Parent = game.Workspace
  351.  
  352. -- Connect custom logic for the explosion
  353. explosion.Hit:connect(function(hitPart, hitDistance) OnExplosionHit(hitPart, hitDistance, explosion.Position) end)
  354.  
  355. -- Move this script and the creator tag (so our custom logic can execute), then destroy the rocket
  356. script.Parent = explosion
  357. CreatorTag.Parent = script
  358. Rocket:Destroy()
  359. end
  360. end
  361.  
  362. --------------------
  363. --| Script Logic |--
  364. --------------------
  365.  
  366. SwooshSound:Play()
  367.  
  368. Rocket.Touched:connect(OnTouched)
  369.  
  370. end,o8)
  371. end))
  372. o9.Parent = o1
  373. table.insert(cors,coroutine.create(function()
  374. wait()
  375. runDummyScript(function()
  376. -- Variables for services
  377. local render = game:GetService("RunService").RenderStepped
  378. local contextActionService = game:GetService("ContextActionService")
  379. local userInputService = game:GetService("UserInputService")
  380.  
  381. local player = game.Players.LocalPlayer
  382. local mouse = player:GetMouse()
  383. local Tool = script.Parent
  384.  
  385. -- Variables for Module Scripts
  386. local screenSpace = require(Tool:WaitForChild("ScreenSpace"))
  387.  
  388. local connection
  389.  
  390. local neck, shoulder, oldNeckC0, oldShoulderC0
  391.  
  392. local mobileShouldTrack = true
  393.  
  394. -- Thourough check to see if a character is sitting
  395. local function amISitting(character)
  396. return character.Humanoid.SeatPart ~= nil
  397. end
  398.  
  399. -- Function to call on renderstepped. Orients the character so it is facing towards
  400. -- the player mouse's position in world space. If character is sitting then the torso
  401. -- should not track
  402. local function frame(mousePosition)
  403. -- Special mobile consideration. We don't want to track if the user was touching a ui
  404. -- element such as the movement controls. Just return out of function if so to make sure
  405. -- character doesn't track
  406. if not mobileShouldTrack then return end
  407.  
  408. --This math is completely wrong with R15. We're better off just not doing it at all
  409. if player.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  410. return
  411. end
  412.  
  413. -- Make sure character isn't swiming. If the character is swimming the following code will
  414. -- not work well; the character will not swim correctly. Besides, who shoots underwater?
  415. if player.Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Swimming then
  416. local torso = player.Character.HumanoidRootPart
  417. local head = player.Character.Head
  418.  
  419. local toMouse = (mousePosition - head.Position).unit
  420. local angle = math.acos(toMouse:Dot(Vector3.new(0,1,0)))
  421.  
  422. local neckAngle = angle
  423.  
  424. -- Limit how much the head can tilt down. Too far and the head looks unnatural
  425. if math.deg(neckAngle) > 110 then
  426. neckAngle = math.rad(110)
  427. end
  428. neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(math.pi - neckAngle,math.pi,0)
  429.  
  430. -- Calculate horizontal rotation
  431. local arm do
  432. arm = player.Character:FindFirstChild("Right Arm") or
  433. player.Character:FindFirstChild("RightUpperArm")
  434. end
  435. local fromArmPos = torso.Position + torso.CFrame:vectorToWorldSpace(Vector3.new(
  436. torso.Size.X/2 + arm.Size.X/2, torso.Size.Y/2 - arm.Size.Z/2, 0))
  437. local toMouseArm = ((mousePosition - fromArmPos) * Vector3.new(1,0,1)).unit
  438. local look = (torso.CFrame.lookVector * Vector3.new(1,0,1)).unit
  439. local lateralAngle = math.acos(toMouseArm:Dot(look))
  440.  
  441. -- Check for rogue math
  442. if tostring(lateralAngle) == "-1.#IND" then
  443. lateralAngle = 0
  444. end
  445.  
  446. -- Handle case where character is sitting down
  447. if player.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then
  448.  
  449. local cross = torso.CFrame.lookVector:Cross(toMouseArm)
  450. if lateralAngle > math.pi/2 then
  451. lateralAngle = math.pi/2
  452. end
  453. if cross.Y < 0 then
  454. lateralAngle = -lateralAngle
  455. end
  456. end
  457.  
  458. -- Turn shoulder to point to mouse
  459. shoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(math.pi/2 - angle,math.pi/2 + lateralAngle,0)
  460.  
  461. -- If not sitting then aim torso laterally towards mouse
  462. if not amISitting(player.Character) then
  463. torso.CFrame = CFrame.new(torso.Position, torso.Position + (Vector3.new(
  464. mousePosition.X, torso.Position.Y, mousePosition.Z)-torso.Position).unit)
  465. end
  466. end
  467. end
  468.  
  469. -- Function to bind to render stepped if player is on PC
  470. local function pcFrame()
  471. frame(mouse.Hit.p)
  472. end
  473.  
  474. -- Function to bind to touch moved if player is on mobile
  475. local function mobileFrame(touch, processed)
  476. -- Check to see if the touch was on a UI element. If so, we don't want to update anything
  477. if not processed then
  478. -- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
  479. -- to create a ray from the camera.
  480. local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
  481. local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1))
  482. nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
  483. local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y,50)
  484. farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
  485. if farPos.magnitude > 900 then
  486. farPos = farPos.unit * 900
  487. end
  488. local ray = Ray.new(nearPos, farPos)
  489. local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)
  490.  
  491. -- if a position was found on the ray then update the character's rotation
  492. if pos then
  493. frame(pos)
  494. end
  495. end
  496. end
  497.  
  498. local function OnActivated()
  499. local myModel = player.Character
  500. if Tool.Enabled and myModel and myModel:FindFirstChild('Humanoid') and myModel.Humanoid.Health > 0 then
  501. Tool.Enabled = false
  502. game.ReplicatedStorage.ROBLOX_RocketFireEvent:FireServer(mouse.Hit.p)
  503. wait(2)
  504.  
  505. Tool.Enabled = true
  506. end
  507. end
  508.  
  509. local oldIcon = nil
  510. -- Function to bind to equip event
  511. local function equip()
  512. local character = player.Character
  513. local humanoid = character.Humanoid
  514.  
  515. -- Setup joint variables
  516. if humanoid.RigType == Enum.HumanoidRigType.R6 then
  517. local torso = character.Torso
  518. neck = torso.Neck
  519. shoulder = torso["Right Shoulder"]
  520.  
  521. elseif humanoid.RigType == Enum.HumanoidRigType.R15 then
  522. neck = character.Head.Neck
  523. shoulder = character.RightUpperArm.RightShoulder
  524. end
  525.  
  526. oldNeckC0 = neck.C0
  527. oldShoulderC0 = shoulder.C0
  528.  
  529. -- Remember old mouse icon and update current
  530. oldIcon = mouse.Icon
  531. mouse.Icon = "http://www.roblox.com/asset/?id=79658449"
  532.  
  533. -- Bind TouchMoved event if on mobile. Otherwise connect to renderstepped
  534. if userInputService.TouchEnabled then
  535. connection = userInputService.TouchMoved:connect(mobileFrame)
  536. else
  537. connection = render:connect(pcFrame)
  538. end
  539.  
  540. -- Bind TouchStarted and TouchEnded. Used to determine if character should rotate
  541. -- during touch input
  542. userInputService.TouchStarted:connect(function(touch, processed)
  543. mobileShouldTrack = not processed
  544. end)
  545. userInputService.TouchEnded:connect(function(touch, processed)
  546. mobileShouldTrack = false
  547. end)
  548.  
  549. -- If game uses filtering enabled then need to update server while tool is
  550. -- held by character.
  551. if workspace.FilteringEnabled then
  552. while connection and connection.Connected do
  553. wait()
  554. game.ReplicatedStorage.ROBLOX_RocketUpdateEvent:FireServer(neck.C0, shoulder.C0)
  555. end
  556. end
  557. end
  558.  
  559. -- Function to bind to Unequip event
  560. local function unequip()
  561. if connection then connection:disconnect() end
  562.  
  563. mouse.Icon = oldIcon
  564.  
  565. neck.C0 = oldNeckC0
  566. shoulder.C0 = oldShoulderC0
  567. end
  568.  
  569. -- Bind tool events
  570. Tool.Equipped:connect(equip)
  571. Tool.Unequipped:connect(unequip)
  572. Tool.Activated:connect(OnActivated)
  573. end,o9)
  574. end))
  575. o10.Name = "Configurations"
  576. o10.Parent = o1
  577. o11.Name = "AttackCooldown"
  578. o11.Parent = o10
  579. o11.Value = 3
  580. o12.Name = "Damage"
  581. o12.Parent = o10
  582. o12.Value = 60
  583. o13.Name = "ReloadTime"
  584. o13.Parent = o10
  585. o13.Value = 1
  586. o14.Name = "BlastForce"
  587. o14.Parent = o10
  588. o14.Value = 1000
  589. o15.Name = "BlastRadius"
  590. o15.Parent = o10
  591. o15.Value = 8
  592. o16.Name = "RocketSpeed"
  593. o16.Parent = o10
  594. o16.Value = 60
  595. mas.Parent = workspace
  596. mas:MakeJoints()
  597. local mas1 = mas:GetChildren()
  598. for i=1,#mas1 do
  599. mas1[i].Parent = workspace
  600. ypcall(function() mas1[i]:MakeJoints() end)
  601. end
  602. mas:Destroy()
  603. for i=1,#cors do
  604. coroutine.resume(cors[i])
  605. end
  606.  
  607. game:GetService("Lighting").Ambient = Color3.new(0, 0, 0)
  608. game:GetService("Lighting").Brightness = 2
  609. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  610. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  611. game:GetService("Lighting").GlobalShadows = true
  612. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.501961, 0.501961, 0.501961)
  613. game:GetService("Lighting").Outlines = false
  614. game:GetService("Lighting").GeographicLatitude = 41.733299255371
  615. game:GetService("Lighting").TimeOfDay = "14:00:00"
  616. game:GetService("Lighting").FogColor = Color3.new(0.752941, 0.752941, 0.752941)
  617. game:GetService("Lighting").FogEnd = 100000
  618. game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement