Advertisement
Nubic_Cubic

PhysicsGun

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