SHARE
TWEET

Untitled

Originickname Sep 17th, 2019 (edited) 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4.     print("FE Compatibility code by Mokiros")
  5.     script.Parent = Player.Character
  6.  
  7.     --RemoteEvent for communicating
  8.     local Event = Instance.new("RemoteEvent")
  9.     Event.Name = "UserInput_Event"
  10.  
  11.     --Fake event to make stuff like Mouse.KeyDown work
  12.     local function fakeEvent()
  13.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14.         t.connect = t.Connect
  15.         return t
  16.     end
  17.  
  18.     --Creating fake input objects with fake variables
  19.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23.     end}
  24.     --Merged 2 functions into one by checking amount of arguments
  25.     CAS.UnbindAction = CAS.BindAction
  26.  
  27.     --This function will trigger the events that have been :Connect()'ed
  28.     local function te(self,ev,...)
  29.         local t = m[ev]
  30.         if t and t._fakeEvent and t.Function then
  31.             t.Function(...)
  32.         end
  33.     end
  34.     m.TrigEvent = te
  35.     UIS.TrigEvent = te
  36.  
  37.     Event.OnServerEvent:Connect(function(plr,io)
  38.         if plr~=Player then return end
  39.         if io.isMouse then
  40.             m.Target = io.Target
  41.             m.Hit = io.Hit
  42.         else
  43.             local b = io.UserInputState == Enum.UserInputState.Begin
  44.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46.             end
  47.             for _,t in pairs(CAS.Actions) do
  48.                 for _,k in pairs(t.Keys) do
  49.                     if k==io.KeyCode then
  50.                         t.Function(t.Name,io.UserInputState,io)
  51.                     end
  52.                 end
  53.             end
  54.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56.         end
  57.     end)
  58.     Event.Parent = NLS([==[
  59.     local Player = owner
  60.     local Event = script:WaitForChild("UserInput_Event")
  61.  
  62.     local UIS = game:GetService("UserInputService")
  63.     local input = function(io,a)
  64.         if a then return end
  65.         --Since InputObject is a client-side instance, we create and pass table instead
  66.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67.     end
  68.     UIS.InputBegan:Connect(input)
  69.     UIS.InputEnded:Connect(input)
  70.  
  71.     local Mouse = Player:GetMouse()
  72.     local h,t
  73.     --Give the server mouse data 30 times every second, but only if the values changed
  74.     --If player is not moving their mouse, client won't fire events
  75.     while wait(1/30) do
  76.         if h~=Mouse.Hit or t~=Mouse.Target then
  77.             h,t=Mouse.Hit,Mouse.Target
  78.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  79.         end
  80.     end]==],Player.Character)
  81.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99. --Physics gun
  100. function sandbox(var,func)
  101.     local env = getfenv(func)
  102.     local newenv = setmetatable({},{
  103.         __index = function(self,k)
  104.             if k=="script" then
  105.                 return var
  106.             else
  107.                 return env[k]
  108.             end
  109.         end,
  110.     })
  111.     setfenv(func,newenv)
  112.     return func
  113. end
  114. cors = {}
  115. mas = Instance.new("Model",game:GetService("Lighting"))
  116. Tool0 = Instance.new("Tool")
  117. Part1 = Instance.new("Part")
  118. CylinderMesh2 = Instance.new("CylinderMesh")
  119. Part3 = Instance.new("Part")
  120. LocalScript4 = Instance.new("LocalScript")
  121. Script5 = Instance.new("Script")
  122. LocalScript6 = Instance.new("LocalScript")
  123. Script7 = Instance.new("Script")
  124. LocalScript8 = Instance.new("LocalScript")
  125. Part9 = Instance.new("Part")
  126. Script10 = Instance.new("Script")
  127. Part11 = Instance.new("Part")
  128. Script12 = Instance.new("Script")
  129. Part13 = Instance.new("Part")
  130. Script14 = Instance.new("Script")
  131. Tool0.Name = "Physics Gun"
  132. Tool0.Parent = mas
  133. Tool0.CanBeDropped = false
  134. Part1.Name = "Handle"
  135. Part1.Parent = Tool0
  136. Part1.Material = Enum.Material.Neon
  137. Part1.BrickColor = BrickColor.new("Cyan")
  138. Part1.Transparency = 1
  139. Part1.Rotation = Vector3.new(0, 15.4200001, 0)
  140. Part1.CanCollide = false
  141. Part1.FormFactor = Enum.FormFactor.Custom
  142. Part1.Size = Vector3.new(1, 0.400000036, 0.300000012)
  143. Part1.CFrame = CFrame.new(-55.2695465, 0.696546972, 0.383156985, 0.96399641, -4.98074878e-05, 0.265921414, 4.79998416e-05, 1, 1.32960558e-05, -0.265921414, -5.30653779e-08, 0.96399641)
  144. Part1.BottomSurface = Enum.SurfaceType.Smooth
  145. Part1.TopSurface = Enum.SurfaceType.Smooth
  146. Part1.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  147. Part1.Position = Vector3.new(-55.2695465, 0.696546972, 0.383156985)
  148. Part1.Orientation = Vector3.new(0, 15.4200001, 0)
  149. Part1.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  150. CylinderMesh2.Parent = Part1
  151. CylinderMesh2.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  152. CylinderMesh2.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  153. Part3.Name = "Shoot"
  154. Part3.Parent = Tool0
  155. Part3.Material = Enum.Material.Neon
  156. Part3.BrickColor = BrickColor.new("Cyan")
  157. Part3.Reflectance = 0.30000001192093
  158. Part3.Transparency = 1
  159. Part3.Rotation = Vector3.new(90.9799957, 0.25999999, -91.409996)
  160. Part3.CanCollide = false
  161. Part3.FormFactor = Enum.FormFactor.Custom
  162. Part3.Size = Vector3.new(0.200000003, 0.25, 0.310000032)
  163. Part3.CFrame = CFrame.new(-54.7998123, 0.774299085, -0.757350147, -0.0245519895, 0.99968797, 0.00460194098, 0.0169109926, 0.00501798885, -0.999844491, -0.999555528, -0.0244703442, -0.0170289185)
  164. Part3.BottomSurface = Enum.SurfaceType.Smooth
  165. Part3.TopSurface = Enum.SurfaceType.Smooth
  166. Part3.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  167. Part3.Position = Vector3.new(-54.7998123, 0.774299085, -0.757350147)
  168. Part3.Orientation = Vector3.new(88.9899979, 164.87999, 73.4700012)
  169. Part3.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  170. LocalScript4.Parent = Tool0
  171. table.insert(cors,sandbox(LocalScript4,function()
  172. -- Variables for services
  173. local render = game:GetService("RunService").Stepped
  174. local contextActionService = game:GetService("ContextActionService")
  175. local userInputService = game:GetService("UserInputService")
  176.  
  177. local player = game.Players.Owner
  178. local Tool = script.Parent
  179.  
  180. -- Variables for Module Scripts
  181. local screenSpace = require(Tool:WaitForChild("ScreenSpace"))
  182.  
  183. local connection
  184. -- Variables for character joints
  185.  
  186. local neck, shoulder, oldNeckC0, oldShoulderC0
  187.  
  188. local mobileShouldTrack = true
  189.  
  190. -- Thourough check to see if a character is sitting
  191. local function amISitting(character)
  192.     local t = character.Torso
  193.     for _, part in pairs(t:GetConnectedParts(true)) do
  194.         if part:IsA("Seat") or part:IsA("VehicleSeat") then
  195.             return true
  196.         end
  197.     end
  198. end
  199.  
  200. -- Function to call on stepped. Orients the character so it is facing towards
  201. -- the player mouse's position in world space. If character is sitting then the torso
  202. -- should not track
  203. local function frame(mousePosition)
  204.     -- Special mobile consideration. We don't want to track if the user was touching a ui
  205.     -- element such as the movement controls. Just return out of function if so to make sure
  206.     -- character doesn't track
  207.     if not mobileShouldTrack then return end
  208.    
  209.     -- Make sure character isn't swiming. If the character is swimming the following code will
  210.     -- not work well; the character will not swim correctly. Besides, who shoots underwater?
  211.     if player.Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Swimming then
  212.         local torso = player.Character.Torso
  213.         local head = player.Character.Head
  214.        
  215.         local toMouse = (mousePosition - head.Position).unit
  216.         local angle = math.acos(toMouse:Dot(Vector3.new(0,1,0)))
  217.        
  218.         local neckAngle = angle
  219.    
  220.         -- Limit how much the head can tilt down. Too far and the head looks unnatural
  221.         if math.deg(neckAngle) > 110 then
  222.             neckAngle = math.rad(110)
  223.         end
  224.         neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(math.pi - neckAngle,math.pi,0)
  225.        
  226.         -- Calculate horizontal rotation
  227.         local arm = player.Character:FindFirstChild("Right Arm")
  228.         local fromArmPos = torso.Position + torso.CFrame:vectorToWorldSpace(Vector3.new(
  229.             torso.Size.X/2 + arm.Size.X/2, torso.Size.Y/2 - arm.Size.Z/2, 0))
  230.         local toMouseArm = ((mousePosition - fromArmPos) * Vector3.new(1,0,1)).unit
  231.         local look = (torso.CFrame.lookVector * Vector3.new(1,0,1)).unit
  232.         local lateralAngle = math.acos(toMouseArm:Dot(look))       
  233.        
  234.         -- Check for rogue math
  235.         if tostring(lateralAngle) == "-1.#IND" then
  236.             lateralAngle = 0
  237.         end    
  238.        
  239.         -- Handle case where character is sitting down
  240.         if player.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then          
  241.            
  242.             local cross = torso.CFrame.lookVector:Cross(toMouseArm)
  243.             if lateralAngle > math.pi/2 then
  244.                 lateralAngle = math.pi/2
  245.             end
  246.             if cross.Y < 0 then
  247.                 lateralAngle = -lateralAngle
  248.             end
  249.         end
  250.        
  251.         -- Turn shoulder to point to mouse
  252.         shoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(math.pi/2 - angle,math.pi/2 + lateralAngle,0)
  253.        
  254.         -- If not sitting then aim torso laterally towards mouse
  255.         if not amISitting(player.Character) then
  256.             torso.CFrame = CFrame.new(torso.Position, torso.Position + (Vector3.new(
  257.                 mousePosition.X, torso.Position.Y, mousePosition.Z)-torso.Position).unit)
  258.         else
  259.             --print("sitting")     
  260.         end
  261.     end
  262. end
  263.  
  264. -- Function to bind to render stepped if player is on PC
  265. local function pcFrame()
  266.     frame(mouse.Hit.p)
  267. end
  268.  
  269. -- Function to bind to touch moved if player is on mobile
  270. local function mobileFrame(touch, processed)
  271.     -- Check to see if the touch was on a UI element. If so, we don't want to update anything
  272.     if not processed then
  273.         -- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
  274.         -- to create a ray from the camera.
  275.         local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
  276.         local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1))
  277.         nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
  278.         local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y,50)
  279.         farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
  280.         if farPos.magnitude > 900 then
  281.             farPos = farPos.unit * 900
  282.         end
  283.         local ray = Ray.new(nearPos, farPos)
  284.         local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)
  285.        
  286.         -- if a position was found on the ray then update the character's rotation
  287.         if pos then
  288.             frame(pos)
  289.         end
  290.     end
  291. end
  292.  
  293. local oldIcon = nil
  294. -- Function to bind to equip event
  295. local function equip()
  296.     local torso = player.Character.Torso
  297.    
  298.     -- Setup joint variables
  299.     neck = torso.Neck  
  300.     oldNeckC0 = neck.C0
  301.     shoulder = torso:FindFirstChild("Right Shoulder")
  302.     oldShoulderC0 = shoulder.C0
  303.    
  304.     -- Remember old mouse icon and update current
  305.     oldIcon = mouse.Icon
  306.     mouse.Icon = "rbxassetid:// 509381906"
  307.    
  308.     -- Bind TouchMoved event if on mobile. Otherwise connect to stepped
  309.     if userInputService.TouchEnabled then
  310.         connection = userInputService.TouchMoved:connect(mobileFrame)
  311.     else
  312.         connection = render:connect(pcFrame)
  313.     end
  314.    
  315.     -- Bind TouchStarted and TouchEnded. Used to determine if character should rotate
  316.     -- during touch input
  317.     userInputService.TouchStarted:connect(function(touch, processed)
  318.         mobileShouldTrack = not processed
  319.     end)   
  320.     userInputService.TouchEnded:connect(function(touch, processed)
  321.         mobileShouldTrack = false
  322.     end)
  323.    
  324.     -- Fire server's equip event
  325.     game.ReplicatedStorage.ROBLOX_PistolEquipEvent:FireServer()
  326.    
  327.     -- Bind event for when mouse is clicked to fire server's fire event
  328.     mouse.Button1Down:connect(function()
  329.         game.ReplicatedStorage.ROBLOX_PistolFireEvent:FireServer(mouse.Hit.p)
  330.     end)
  331.    
  332.     -- Bind reload event to mobile button and r key
  333.     contextActionService:BindActionToInputTypes("Reload", function()
  334.         game.ReplicatedStorage.ROBLOX_PistolReloadEvent:FireServer()       
  335.     end, true, "")
  336.    
  337.     -- If game uses filtering enabled then need to update server while tool is
  338.     -- held by character.
  339.     if workspace.FilteringEnabled then
  340.         while connection do
  341.             wait()
  342.             game.ReplicatedStorage.ROBLOX_PistolUpdateEvent:FireServer(neck.C0, shoulder.C0)
  343.         end
  344.     end
  345. end
  346.  
  347. -- Function to bind to Unequip event
  348. local function unequip()
  349.     if connection then connection:disconnect() end
  350.     contextActionService:UnbindAction("Reload")
  351.     game.ReplicatedStorage.ROBLOX_PistolUnequipEvent:FireServer()
  352.     mouse.Icon = oldIcon
  353.     neck.C0 = oldNeckC0
  354.     shoulder.C0 = oldShoulderC0
  355. end
  356.  
  357. -- Bind tool events
  358. Tool.Equipped:connect(equip)
  359. Tool.Unequipped:connect(unequip)
  360. end))
  361. Script5.Name = "qPerfectionWeld"
  362. Script5.Parent = Tool0
  363. table.insert(cors,sandbox(Script5,function()
  364. -- Created by Quenty (@Quenty, follow me on twitter).
  365. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  366. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  367.  
  368. --[[ INSTRUCTIONS
  369. - Place in the model
  370. - Make sure model is anchored
  371. - That's it. It will weld the model and all children.
  372.  
  373. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  374. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  375. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  376. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  377. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  378. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  379. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  380. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  381.  
  382. This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
  383. ]]
  384.  
  385. --[[ DOCUMENTATION
  386. - Will work in tools. If ran more than once it will not create more than one weld.  This is especially useful for tools that are dropped and then picked up again.
  387. - Will work in PBS servers
  388. - Will work as long as it starts out with the part anchored
  389. - Stores the relative CFrame as a CFrame value
  390. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  391. - Utilizes a recursive algorith to find all parts in the model
  392. - Will reweld on script reparent if the script is initially parented to a tool.
  393. - Welds as fast as possible
  394. ]]
  395.  
  396. -- qPerfectionWeld.lua
  397. -- Created 10/6/2014
  398. -- Author: Quenty
  399. -- Version 1.0.3
  400.  
  401. -- Updated 10/14/2014 - Updated to 1.0.1
  402. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  403.  
  404. -- Updated 10/14/2014 - Updated to 1.0.2
  405. --- Fixed bug fix.
  406.  
  407. -- Updated 10/14/2014 - Updated to 1.0.3
  408. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  409.  
  410. local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
  411.  
  412.  
  413. local function CallOnChildren(Instance, FunctionToCall)
  414.     -- Calls a function on each of the children of a certain object, using recursion.  
  415.  
  416.     FunctionToCall(Instance)
  417.  
  418.     for _, Child in next, Instance:GetChildren() do
  419.         CallOnChildren(Child, FunctionToCall)
  420.     end
  421. end
  422.  
  423. local function GetNearestParent(Instance, ClassName)
  424.     -- Returns the nearest parent of a certain class, or returns nil
  425.  
  426.     local Ancestor = Instance
  427.     repeat
  428.         Ancestor = Ancestor.Parent
  429.         if Ancestor == nil then
  430.             return nil
  431.         end
  432.     until Ancestor:IsA(ClassName)
  433.  
  434.     return Ancestor
  435. end
  436.  
  437. local function GetBricks(StartInstance)
  438.     local List = {}
  439.  
  440.     -- if StartInstance:IsA("BasePart") then
  441.     --  List[#List+1] = StartInstance
  442.     -- end
  443.  
  444.     CallOnChildren(StartInstance, function(Item)
  445.         if Item:IsA("BasePart") then
  446.             List[#List+1] = Item;
  447.         end
  448.     end)
  449.  
  450.     return List
  451. end
  452.  
  453. local function Modify(Instance, Values)
  454.     -- Modifies an Instance by using a table.  
  455.  
  456.     assert(type(Values) == "table", "Values is not a table");
  457.  
  458.     for Index, Value in next, Values do
  459.         if type(Index) == "number" then
  460.             Value.Parent = Instance
  461.         else
  462.             Instance[Index] = Value
  463.         end
  464.     end
  465.     return Instance
  466. end
  467.  
  468. local function Make(ClassType, Properties)
  469.     -- Using a syntax hack to create a nice way to Make new items.  
  470.  
  471.     return Modify(Instance.new(ClassType), Properties)
  472. end
  473.  
  474. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  475. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  476.  
  477. local function HasWheelJoint(Part)
  478.     for _, SurfaceName in pairs(Surfaces) do
  479.         for _, HingSurfaceName in pairs(HingSurfaces) do
  480.             if Part[SurfaceName].Name == HingSurfaceName then
  481.                 return true
  482.             end
  483.         end
  484.     end
  485.    
  486.     return false
  487. end
  488.  
  489. local function ShouldBreakJoints(Part)
  490.     --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  491.     --  definitely some edge cases.
  492.  
  493.     if NEVER_BREAK_JOINTS then
  494.         return false
  495.     end
  496.    
  497.     if HasWheelJoint(Part) then
  498.         return false
  499.     end
  500.    
  501.     local Connected = Part:GetConnectedParts()
  502.    
  503.     if #Connected == 1 then
  504.         return false
  505.     end
  506.    
  507.     for _, Item in pairs(Connected) do
  508.         if HasWheelJoint(Item) then
  509.             return false
  510.         elseif not Item:IsDescendantOf(script.Parent) then
  511.             return false
  512.         end
  513.     end
  514.    
  515.     return true
  516. end
  517.  
  518. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  519.     --- Weld's 2 parts together
  520.     -- @param Part0 The first part
  521.     -- @param Part1 The second part (Dependent part most of the time).
  522.     -- @param [JointType] The type of joint. Defaults to weld.
  523.     -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  524.     -- @return The weld created.
  525.  
  526.     JointType = JointType or "Weld"
  527.     local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  528.    
  529.     local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  530.     Modify(NewWeld, {
  531.         Name = "qCFrameWeldThingy";
  532.         Part0  = Part0;
  533.         Part1  = Part1;
  534.         C0     = CFrame.new();--Part0.CFrame:inverse();
  535.         C1     = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  536.         Parent = Part1;
  537.     })
  538.  
  539.     if not RelativeValue then
  540.         RelativeValue = Make("CFrameValue", {
  541.             Parent     = Part1;
  542.             Name       = "qRelativeCFrameWeldValue";
  543.             Archivable = true;
  544.             Value      = NewWeld.C1;
  545.         })
  546.     end
  547.  
  548.     return NewWeld
  549. end
  550.  
  551. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  552.     -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  553.     -- @param MainPart The part to weld the model to (can be in the model).
  554.     -- @param [JointType] The type of joint. Defaults to weld.
  555.     -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  556.    
  557.     for _, Part in pairs(Parts) do
  558.         if ShouldBreakJoints(Part) then
  559.             Part:BreakJoints()
  560.         end
  561.     end
  562.    
  563.     for _, Part in pairs(Parts) do
  564.         if Part ~= MainPart then
  565.             WeldTogether(MainPart, Part, JointType, MainPart)
  566.         end
  567.     end
  568.  
  569.     if not DoNotUnanchor then
  570.         for _, Part in pairs(Parts) do
  571.             Part.Anchored = false
  572.         end
  573.         MainPart.Anchored = false
  574.     end
  575. end
  576.  
  577. local function PerfectionWeld()
  578.     local Tool = GetNearestParent(script, "Tool")
  579.  
  580.     local Parts = GetBricks(script.Parent)
  581.     local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
  582.  
  583.     if PrimaryPart then
  584.         WeldParts(Parts, PrimaryPart, "Weld", false)
  585.     else
  586.         warn("qWeld - Unable to weld part")
  587.     end
  588.    
  589.     return Tool
  590. end
  591.  
  592. local Tool = PerfectionWeld()
  593.  
  594.  
  595. if Tool and script.ClassName == "Script" then
  596.     --- Don't bother with local scripts
  597.  
  598.     script.Parent.AncestryChanged:connect(function()
  599.         PerfectionWeld()
  600.     end)
  601. end
  602.  
  603. -- Created by Quenty (@Quenty, follow me on twitter).
  604.  
  605. end))
  606. LocalScript6.Name = "Animate"
  607. LocalScript6.Parent = Tool0
  608. table.insert(cors,sandbox(LocalScript6,function()
  609. local arms = nil
  610. local torso = nil
  611. local welds = {}
  612. local Tool = script.Parent
  613. local neck = nil
  614. local orginalC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  615.  
  616. function Equip(mouse)
  617. wait(0.01)
  618. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  619. head = Tool.Parent:FindFirstChild("Head")
  620. torso = Tool.Parent:FindFirstChild("Torso")
  621. if neck == nil then
  622. neck = Tool.Parent:FindFirstChild("Torso").Neck
  623. end
  624. if arms ~= nil and torso ~= nil then
  625. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  626. if sh ~= nil then
  627. local yes = true
  628. if yes then
  629. yes = false
  630. sh[1].Part1 = nil
  631. sh[2].Part1 = nil
  632. local weld1 = Instance.new("Weld")
  633. weld1.Part0 = head
  634. weld1.Parent = head
  635. weld1.Part1 = arms[1]
  636. welds[1] = weld1
  637. local weld2 = Instance.new("Weld")
  638. weld2.Part0 = head
  639. weld2.Parent = head
  640. weld2.Part1 = arms[2]
  641. welds[2] = weld2
  642. -------------------------here
  643. weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  644. weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  645.     mouse.Move:connect(function ()
  646.         --local Direction = Tool.Direction.Value
  647.         local Direction = mouse.Hit.p
  648.         local b = head.Position.Y-Direction.Y
  649.         local dist = (head.Position-Direction).magnitude
  650.         local answer = math.asin(b/dist)
  651.         neck.C0=orginalC0*CFrame.fromEulerAnglesXYZ(answer,0,0)
  652.         wait(0.1)
  653.     end)end
  654. else
  655. print("sh")
  656. end
  657. else
  658. print("arms")
  659. end
  660. end
  661.  
  662. function Unequip(mouse)
  663. if arms ~= nil and torso ~= nil then
  664. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  665. if sh ~= nil then
  666. local yes = true
  667. if yes then
  668. yes = false
  669.     neck.C0 = orginalC0
  670.  
  671. sh[1].Part1 = arms[1]
  672. sh[2].Part1 = arms[2]
  673. welds[1].Parent = nil
  674. welds[2].Parent = nil
  675. end
  676. else
  677. print("sh")
  678. end
  679. else
  680. print("arms")
  681. end
  682. end
  683. Tool.Equipped:connect(Equip)
  684. Tool.Unequipped:connect(Unequip)
  685.  
  686. function Animate()
  687. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  688.     if Tool.AnimateValue.Value == "Shoot" then
  689.         local weld1 = welds[1]
  690.         local weld2 = welds[2]
  691.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  692.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  693.         wait(0.00001)
  694.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.05, math.rad(-90))
  695.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  696.         wait(0.00001)
  697.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.1, math.rad(-90))
  698.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-15), 0)
  699.         wait(0.00001)
  700.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.3, math.rad(-90))
  701.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-15), 0)
  702.         wait(0.00001)
  703.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.35, math.rad(-90))
  704.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-115), math.rad(-15), 0)
  705.         wait(0.00001)
  706.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  707.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  708.         wait(0.00001)
  709.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  710.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)   
  711.         Tool.AnimateValue.Value = "None"
  712.     end
  713.     if Tool.AnimateValue.Value == "Reload" then
  714.         local weld1 = welds[1]
  715.         local weld2 = welds[2]
  716.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  717.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  718.         wait(0.0001)
  719.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  720.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  721.         wait(0.0001)
  722.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  723.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-15), 0)
  724.         wait(0.0001)
  725.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  726.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-100), math.rad(-15), 0)
  727.         wait(0.0001)
  728.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  729.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-105), math.rad(-15), 0)
  730.         wait(0.0001)
  731.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  732.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-15), 0)
  733.         wait(0.0001)
  734.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.4, math.rad(-90))
  735.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-115), math.rad(-15), 0)
  736.         wait(0.0001)
  737.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.45, math.rad(-90))
  738.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  739.         wait(0.0001)
  740.         weld1.C1 = CFrame.new(-0.5+1.5, 0.9, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.5, math.rad(-90))
  741.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  742.         wait(0.0001)
  743.         weld1.C1 = CFrame.new(-0.5+1.5, 1, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.55, math.rad(-90))
  744.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  745.         wait(0.0001)
  746.         weld1.C1 = CFrame.new(-0.5+1.5, 1.1, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.57, math.rad(-90))
  747.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  748.         wait(0.0001)
  749.         weld1.C1 = CFrame.new(-0.5+1.5, 1.2, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.6, math.rad(-90))
  750.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  751.         wait(0.0001)
  752.         weld1.C1 = CFrame.new(-0.5+1.5, 1.3, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0.6, math.rad(-90))
  753.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-120), math.rad(-15), 0)
  754.         wait(0.0001)
  755.         weld1.C1 = CFrame.new(-0.5+1.5, 0.8, .9)* CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  756.         weld2.C1 = CFrame.new(-1, 0.8, 0.5-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)   
  757.         Tool.AnimateValue.Value = "None"
  758.     end
  759. end
  760.  
  761. Tool.AnimateValue.Changed:connect(Animate)
  762.  
  763. end))
  764. Script7.Name = "LineConnect"
  765. Script7.Parent = Tool0
  766. Script7.Disabled = true
  767. table.insert(cors,sandbox(Script7,function()
  768. wait()
  769. local check = script.Part2
  770. local part1 = script.Part1.Value
  771. local part2 = script.Part2.Value
  772. local parent = script.Par.Value
  773. local color = script.Color
  774. local line = Instance.new("Part")
  775. line.TopSurface = 0
  776. line.BottomSurface = 0
  777. line.Reflectance = .5
  778. line.Name = "Laser"
  779. line.Transparency = 0.6
  780. line.Locked = true
  781. line.CanCollide = false
  782. line.Anchored = true
  783. line.formFactor = 0
  784. line.Size = Vector3.new(0.4,0.4,1)
  785. local mesh = Instance.new("BlockMesh")
  786. mesh.Parent = line
  787. while true do
  788.     if (check.Value==nil) then break end
  789.     if (part1==nil or part2==nil or parent==nil) then break end
  790.     if (part1.Parent==nil or part2.Parent==nil) then break end
  791.     if (parent.Parent==nil) then break end
  792.     local lv = CFrame.new(part1.Position,part2.Position)
  793.     local dist = (part1.Position-part2.Position).magnitude
  794.     line.Parent = parent
  795.     line.Material = "Neon"
  796.     line.BrickColor = color.Value.BrickColor
  797.     line.Reflectance = color.Value.Reflectance
  798.     line.Transparency = "0.2"
  799.     line.CFrame = CFrame.new(part1.Position+lv.lookVector*dist/2)
  800.     line.CFrame = CFrame.new(line.Position,part2.Position)
  801.     mesh.Scale = Vector3.new(.25,.25,dist)
  802.     wait()
  803. end
  804. line:remove()
  805. script:remove()
  806. end))
  807. LocalScript8.Name = "MainScript"
  808. LocalScript8.Parent = Tool0
  809. table.insert(cors,sandbox(LocalScript8,function()
  810. --Physics gun created by Killersoldier45
  811. wait()
  812. tool = script.Parent
  813. lineconnect = tool.LineConnect
  814. object = nil
  815. mousedown = false
  816. found = false
  817. BP = Instance.new("BodyPosition")
  818. BP.maxForce = Vector3.new(math.huge*math.huge,math.huge*math.huge,math.huge*math.huge) --pwns everyone elses bodyposition
  819. BP.P = BP.P*10 --faster movement. less bounceback.
  820. dist = nil
  821. point = Instance.new("Part")
  822. point.Locked = true
  823. point.Anchored = true
  824. point.formFactor = 0
  825. point.Shape = 0
  826. point.Material = 'Neon'
  827. point.BrickColor = BrickColor.new("Toothpaste")
  828. point.Size = Vector3.new(1,1,1)
  829. point.CanCollide = false
  830. local mesh = Instance.new("SpecialMesh")
  831. mesh.MeshType = "Sphere"
  832. mesh.Scale = Vector3.new(.2,.2,.2)
  833. mesh.Parent = point
  834. handle = tool.Shoot
  835. front = tool.Shoot
  836. color = tool.Shoot
  837. objval = nil
  838. local hooked = false
  839. local hookBP = BP:clone()
  840. hookBP.maxForce = Vector3.new(30000,30000,30000)
  841.  
  842. function LineConnect(part1,part2,parent)
  843.     local p1 = Instance.new("ObjectValue")
  844.     p1.Value = part1
  845.     p1.Name = "Part1"
  846.     local p2 = Instance.new("ObjectValue")
  847.     p2.Value = part2
  848.     p2.Name = "Part2"
  849.     local par = Instance.new("ObjectValue")
  850.     par.Value = parent
  851.     par.Name = "Par"
  852.     local col = Instance.new("ObjectValue")
  853.     col.Value = color
  854.     col.Name = "Color"
  855.     local s = lineconnect:clone()
  856.     s.Disabled = false
  857.     p1.Parent = s
  858.     p2.Parent = s
  859.     par.Parent = s
  860.     col.Parent = s
  861.     s.Parent = workspace
  862.     if (part2==object) then
  863.         objval = p2
  864.     end
  865. end
  866.  
  867. function onButton1Down(mouse)
  868.     if (mousedown==true) then return end
  869.     mousedown = true
  870.     coroutine.resume(coroutine.create(function()
  871.         local p = point:clone()
  872.         p.Parent = tool
  873.         LineConnect(front,p,workspace)
  874.         while (mousedown==true) do
  875.             p.Parent = tool
  876.             if (object==nil) then
  877.                 if (mouse.Target==nil) then
  878.                     local lv = CFrame.new(front.Position,mouse.Hit.p)
  879.                     p.CFrame = CFrame.new(front.Position+(lv.lookVector*1000))
  880.                 else
  881.                     p.CFrame = CFrame.new(mouse.Hit.p)
  882.                 end
  883.             else
  884.                 LineConnect(front,object,workspace)
  885.                 break
  886.             end
  887.             wait()
  888.         end
  889.         p:remove()
  890.     end))
  891.     while (mousedown==true) do
  892.         if (mouse.Target~=nil) then
  893.             local t = mouse.Target
  894.             if (t.Anchored==false) then
  895.                 object = t
  896.                 dist = (object.Position-front.Position).magnitude
  897.                 break
  898.             end
  899.         end
  900.         wait()
  901.     end
  902.     while (mousedown==true) do
  903.         if (object.Parent==nil) then break end
  904.         local lv = CFrame.new(front.Position,mouse.Hit.p)
  905.         BP.Parent = object
  906.         BP.position = front.Position+lv.lookVector*dist
  907.         wait()
  908.     end
  909.     BP:remove()
  910.     object = nil
  911.     objval.Value = nil
  912. end
  913.  
  914. function onKeyDown(key,mouse)
  915.     local key = key:lower()
  916.     local yesh = false
  917.     if (key=="q") then
  918.         if (dist>=5) then
  919.             dist = dist-5
  920.         end
  921.     end
  922.     if key == "" then
  923.     if (object==nil) then return end
  924.     for _,v in pairs(object:children()) do
  925.     if v.className == "BodyGyro" then
  926.     return nil
  927.     end
  928.     end
  929.     BG = Instance.new("BodyGyro")
  930.     BG.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  931.     BG.cframe = CFrame.new(object.CFrame.p)
  932.     BG.Parent = object
  933.     repeat wait() until(object.CFrame == CFrame.new(object.CFrame.p))
  934.     BG.Parent = nil
  935.     if (object==nil) then return end
  936.     for _,v in pairs(object:children()) do
  937.     if v.className == "BodyGyro" then
  938.     v.Parent = nil
  939.     end
  940.     end
  941.     object.Velocity = Vector3.new(0,0,0)
  942.     object.RotVelocity = Vector3.new(0,0,0)
  943.     end
  944.     if (key=="e") then
  945.         dist = dist+5
  946.     end
  947.     if (string.byte(key)==27) then
  948.         if (object==nil) then return end
  949.         local e = Instance.new("Explosion")
  950.         e.Parent = workspace
  951.         e.Position = object.Position
  952.         color.BrickColor = BrickColor.Black()
  953.         point.BrickColor = BrickColor.White()
  954.         wait(.48)
  955.         color.BrickColor = BrickColor.White()
  956.         point.BrickColor = BrickColor.Black()
  957.     end
  958.     if (key=="") then
  959.         if not hooked then
  960.         if (object==nil) then return end
  961.         hooked = true
  962.         hookBP.position = object.Position
  963.         if tool.Parent:findFirstChild("Torso") then
  964.         hookBP.Parent = tool.Parent.Torso
  965.         if dist ~= (object.Size.x+object.Size.y+object.Size.z)+5 then
  966.         dist = (object.Size.x+object.Size.y+object.Size.z)+5
  967.         end
  968.         end
  969.         else
  970.         hooked = false
  971.         hookBP.Parent = nil
  972.         end
  973.     end
  974.     if (key=="r") then
  975.         if (object==nil) then return end
  976.         color.BrickColor = BrickColor.new("Toothpaste")
  977.         point.BrickColor = BrickColor.new("Toothpaste")
  978.         object.Parent = nil
  979.         wait(.48)
  980.         color.BrickColor = BrickColor.new("Toothpaste")
  981.         point.BrickColor = BrickColor.new("Toothpaste")
  982.     end
  983.     if (key=="") then
  984.     if (object==nil) then return end
  985.     local New = object:clone()
  986.     New.Parent = object.Parent
  987.     for _,v in pairs(New:children()) do
  988.     if v.className == "BodyPosition" or v.className == "BodyGyro" then
  989.     v.Parent = nil
  990.     end
  991.     end
  992.     object = New
  993.     mousedown = false
  994.     mousedown = true
  995.     LineConnect(front,object,workspace)
  996.         while (mousedown==true) do
  997.         if (object.Parent==nil) then break end
  998.         local lv = CFrame.new(front.Position,mouse.Hit.p)
  999.         BP.Parent = object
  1000.         BP.position = front.Position+lv.lookVector*dist
  1001.         wait()
  1002.     end
  1003.     BP:remove()
  1004.     object = nil
  1005.     objval.Value = nil
  1006.     end
  1007.     if (key=="") then
  1008.         local Cube = Instance.new("Part")
  1009.         Cube.Locked = true
  1010.         Cube.Size = Vector3.new(4,4,4)
  1011.         Cube.formFactor = 0
  1012.         Cube.TopSurface = 0
  1013.         Cube.BottomSurface = 0
  1014.         Cube.Name = "WeightedStorageCube"
  1015.         Cube.Parent = workspace
  1016.         Cube.CFrame = CFrame.new(mouse.Hit.p) + Vector3.new(0,2,0)
  1017.         for i = 0,5 do
  1018.             local Decal = Instance.new("Decal")
  1019.             Decal.Texture = "http://www.roblox.com/asset/?id=2662260"
  1020.             Decal.Face = i
  1021.             Decal.Name = "WeightedStorageCubeDecal"
  1022.             Decal.Parent = Cube
  1023.         end
  1024.     end
  1025.     if (key=="") then
  1026.         if dist ~= 15 then
  1027.             dist = 15
  1028.         end
  1029.     end
  1030. end
  1031.  
  1032. function onEquipped(mouse)
  1033.     keymouse = mouse
  1034.     local char = tool.Parent
  1035.     human = char.Humanoid
  1036.     human.Changed:connect(function() if (human.Health==0) then mousedown = false BP:remove() point:remove() tool:remove() end end)
  1037.     mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  1038.     mouse.Button1Up:connect(function() mousedown = false end)
  1039.     mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end)
  1040.     mouse.Icon = "rbxassetid:// 509381906"
  1041. end
  1042.  
  1043. tool.Equipped:connect(onEquipped)
  1044. end))
  1045. Part9.Name = "GlowPart"
  1046. Part9.Parent = Tool0
  1047. Part9.Material = Enum.Material.Neon
  1048. Part9.BrickColor = BrickColor.new("Cyan")
  1049. Part9.Transparency = 0.5
  1050. Part9.Rotation = Vector3.new(0, -89.5899963, 0)
  1051. Part9.Shape = Enum.PartType.Cylinder
  1052. Part9.Size = Vector3.new(1.20000005, 0.649999976, 2)
  1053. Part9.CFrame = CFrame.new(-54.8191681, 0.773548007, -0.0522949994, 0.00736002205, 4.68389771e-11, -0.999974668, 4.72937245e-11, 1, 1.41590961e-10, 0.999974668, 5.09317033e-11, 0.00736002252)
  1054. Part9.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1055. Part9.Position = Vector3.new(-54.8191681, 0.773548007, -0.0522949994)
  1056. Part9.Orientation = Vector3.new(0, -89.5799942, 0)
  1057. Part9.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1058. Script10.Parent = Part9
  1059. table.insert(cors,sandbox(Script10,function()
  1060. while true do
  1061. wait(0.05)
  1062. script.Parent.Transparency = .5
  1063. wait(0.05)
  1064. script.Parent.Transparency = .6
  1065. wait(0.05)
  1066. script.Parent.Transparency = .7
  1067. wait(0.05)
  1068. script.Parent.Transparency = .8
  1069. wait(0.05)
  1070. script.Parent.Transparency = .9
  1071. wait(0.05)
  1072. script.Parent.Transparency = .8
  1073. wait(0.05)
  1074. script.Parent.Transparency = .7
  1075. wait(0.05)
  1076. script.Parent.Transparency = .6
  1077. wait(0.05)
  1078. script.Parent.Transparency = .5
  1079. end
  1080.  
  1081. end))
  1082. Part11.Name = "GlowPart"
  1083. Part11.Parent = Tool0
  1084. Part11.Material = Enum.Material.Neon
  1085. Part11.BrickColor = BrickColor.new("Cyan")
  1086. Part11.Transparency = 0.5
  1087. Part11.Rotation = Vector3.new(-89.3799973, -55.7399979, -89.25)
  1088. Part11.Size = Vector3.new(0.280000001, 0.25999999, 0.200000003)
  1089. Part11.CFrame = CFrame.new(-54.9808807, 0.99843204, 0.799362957, 0.00736002205, 0.562958956, -0.826454222, 4.72937245e-11, 0.826475084, 0.56297338, 0.999974668, -0.00414349511, 0.00608287565)
  1090. Part11.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1091. Part11.Position = Vector3.new(-54.9808807, 0.99843204, 0.799362957)
  1092. Part11.Orientation = Vector3.new(-34.2599983, -89.5799942, 0)
  1093. Part11.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1094. Script12.Name = "Glow Script"
  1095. Script12.Parent = Part11
  1096. table.insert(cors,sandbox(Script12,function()
  1097. while true do
  1098. wait(0.05)
  1099. script.Parent.Transparency = .5
  1100. wait(0.05)
  1101. script.Parent.Transparency = .6
  1102. wait(0.05)
  1103. script.Parent.Transparency = .7
  1104. wait(0.05)
  1105. script.Parent.Transparency = .8
  1106. wait(0.05)
  1107. script.Parent.Transparency = .9
  1108. wait(0.05)
  1109. script.Parent.Transparency = .8
  1110. wait(0.05)
  1111. script.Parent.Transparency = .7
  1112. wait(0.05)
  1113. script.Parent.Transparency = .6
  1114. wait(0.05)
  1115. script.Parent.Transparency = .5
  1116. end
  1117.  
  1118. end))
  1119. Part13.Name = "GlowPart"
  1120. Part13.Parent = Tool0
  1121. Part13.Material = Enum.Material.Neon
  1122. Part13.BrickColor = BrickColor.new("Cyan")
  1123. Part13.Transparency = 0.5
  1124. Part13.Rotation = Vector3.new(95.1500015, -53.8199997, 98.0799942)
  1125. Part13.Size = Vector3.new(0.280000001, 0.25999999, 0.200000003)
  1126. Part13.CFrame = CFrame.new(-54.5909271, 0.978429973, 0.799362957, -0.0830051303, -0.584483683, -0.807150841, 0.0241250042, 0.808528602, -0.58796227, 0.996258855, -0.0682764053, -0.0530113392)
  1127. Part13.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1128. Part13.Position = Vector3.new(-54.5909271, 0.978429973, 0.799362957)
  1129. Part13.Orientation = Vector3.new(36.0099983, -93.7599945, 1.70999992)
  1130. Part13.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  1131. Script14.Name = "Glow Script"
  1132. Script14.Parent = Part13
  1133. table.insert(cors,sandbox(Script14,function()
  1134. while true do
  1135. wait(0.05)
  1136. script.Parent.Transparency = .5
  1137. wait(0.05)
  1138. script.Parent.Transparency = .6
  1139. wait(0.05)
  1140. script.Parent.Transparency = .7
  1141. wait(0.05)
  1142. script.Parent.Transparency = .8
  1143. wait(0.05)
  1144. script.Parent.Transparency = .9
  1145. wait(0.05)
  1146. script.Parent.Transparency = .8
  1147. wait(0.05)
  1148. script.Parent.Transparency = .7
  1149. wait(0.05)
  1150. script.Parent.Transparency = .6
  1151. wait(0.05)
  1152. script.Parent.Transparency = .5
  1153. end
  1154.  
  1155. end))
  1156. for i,v in pairs(mas:GetChildren()) do
  1157.     v.Parent = owner
  1158.     pcall(function() v:MakeJoints() end)
  1159. end
  1160. mas:Destroy()
  1161. for i,v in pairs(cors) do
  1162.     spawn(function()
  1163.         pcall(v)
  1164.     end)
  1165. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top