Advertisement
Godzillagamerzz10

FE Physics Gun

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