Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4 <
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- RemoteEvent1 = Instance.new("RemoteEvent")
- NumberValue2 = Instance.new("NumberValue")
- Model3 = Instance.new("Model")
- Part4 = Instance.new("Part")
- SpecialMesh5 = Instance.new("SpecialMesh")
- Attachment6 = Instance.new("Attachment")
- Attachment7 = Instance.new("Attachment")
- Attachment8 = Instance.new("Attachment")
- Attachment9 = Instance.new("Attachment")
- Decal10 = Instance.new("Decal")
- BillboardGui11 = Instance.new("BillboardGui")
- TextLabel12 = Instance.new("TextLabel")
- Accessory13 = Instance.new("Accessory")
- Part14 = Instance.new("Part")
- SpecialMesh15 = Instance.new("SpecialMesh")
- Attachment16 = Instance.new("Attachment")
- Vector3Value17 = Instance.new("Vector3Value")
- Accessory18 = Instance.new("Accessory")
- Part19 = Instance.new("Part")
- SpecialMesh20 = Instance.new("SpecialMesh")
- Attachment21 = Instance.new("Attachment")
- Accessory22 = Instance.new("Accessory")
- Part23 = Instance.new("Part")
- SpecialMesh24 = Instance.new("SpecialMesh")
- Attachment25 = Instance.new("Attachment")
- Accessory26 = Instance.new("Accessory")
- Part27 = Instance.new("Part")
- SpecialMesh28 = Instance.new("SpecialMesh")
- Attachment29 = Instance.new("Attachment")
- Vector3Value30 = Instance.new("Vector3Value")
- Accessory31 = Instance.new("Accessory")
- Part32 = Instance.new("Part")
- SpecialMesh33 = Instance.new("SpecialMesh")
- Attachment34 = Instance.new("Attachment")
- Vector3Value35 = Instance.new("Vector3Value")
- ShirtGraphic36 = Instance.new("ShirtGraphic")
- Accessory37 = Instance.new("Accessory")
- Part38 = Instance.new("Part")
- SpecialMesh39 = Instance.new("SpecialMesh")
- Attachment40 = Instance.new("Attachment")
- Pants41 = Instance.new("Pants")
- Shirt42 = Instance.new("Shirt")
- Accessory43 = Instance.new("Accessory")
- Part44 = Instance.new("Part")
- SpecialMesh45 = Instance.new("SpecialMesh")
- Attachment46 = Instance.new("Attachment")
- Vector3Value47 = Instance.new("Vector3Value")
- BodyColors48 = Instance.new("BodyColors")
- Script49 = Instance.new("Script")
- Part50 = Instance.new("Part")
- Sound51 = Instance.new("Sound")
- LocalScript52 = Instance.new("LocalScript")
- Script53 = Instance.new("Script")
- Animation54 = Instance.new("Animation")
- Animation55 = Instance.new("Animation")
- Animation56 = Instance.new("Animation")
- Animation57 = Instance.new("Animation")
- Script58 = Instance.new("Script")
- Model59 = Instance.new("Model")
- Shirt60 = Instance.new("Shirt")
- Pants61 = Instance.new("Pants")
- BodyColors62 = Instance.new("BodyColors")
- Tool63 = Instance.new("Tool")
- RemoteEvent64 = Instance.new("RemoteEvent")
- NumberValue65 = Instance.new("NumberValue")
- Model66 = Instance.new("Model")
- Part67 = Instance.new("Part")
- SpecialMesh68 = Instance.new("SpecialMesh")
- Attachment69 = Instance.new("Attachment")
- Attachment70 = Instance.new("Attachment")
- Attachment71 = Instance.new("Attachment")
- Attachment72 = Instance.new("Attachment")
- Decal73 = Instance.new("Decal")
- BillboardGui74 = Instance.new("BillboardGui")
- TextLabel75 = Instance.new("TextLabel")
- Accessory76 = Instance.new("Accessory")
- Part77 = Instance.new("Part")
- SpecialMesh78 = Instance.new("SpecialMesh")
- Attachment79 = Instance.new("Attachment")
- Accessory80 = Instance.new("Accessory")
- Part81 = Instance.new("Part")
- SpecialMesh82 = Instance.new("SpecialMesh")
- Attachment83 = Instance.new("Attachment")
- Vector3Value84 = Instance.new("Vector3Value")
- Weld85 = Instance.new("Weld")
- Accessory86 = Instance.new("Accessory")
- Part87 = Instance.new("Part")
- SpecialMesh88 = Instance.new("SpecialMesh")
- Attachment89 = Instance.new("Attachment")
- Accessory90 = Instance.new("Accessory")
- Part91 = Instance.new("Part")
- SpecialMesh92 = Instance.new("SpecialMesh")
- Attachment93 = Instance.new("Attachment")
- Vector3Value94 = Instance.new("Vector3Value")
- Weld95 = Instance.new("Weld")
- Script96 = Instance.new("Script")
- Part97 = Instance.new("Part")
- Sound98 = Instance.new("Sound")
- LocalScript99 = Instance.new("LocalScript")
- Script100 = Instance.new("Script")
- Animation101 = Instance.new("Animation")
- Animation102 = Instance.new("Animation")
- Animation103 = Instance.new("Animation")
- Animation104 = Instance.new("Animation")
- Script105 = Instance.new("Script")
- Model106 = Instance.new("Model")
- Shirt107 = Instance.new("Shirt")
- Pants108 = Instance.new("Pants")
- BodyColors109 = Instance.new("BodyColors")
- Tool110 = Instance.new("Tool")
- RemoteEvent111 = Instance.new("RemoteEvent")
- NumberValue112 = Instance.new("NumberValue")
- Model113 = Instance.new("Model")
- Part114 = Instance.new("Part")
- SpecialMesh115 = Instance.new("SpecialMesh")
- Attachment116 = Instance.new("Attachment")
- Attachment117 = Instance.new("Attachment")
- Attachment118 = Instance.new("Attachment")
- Attachment119 = Instance.new("Attachment")
- Decal120 = Instance.new("Decal")
- BillboardGui121 = Instance.new("BillboardGui")
- TextLabel122 = Instance.new("TextLabel")
- CharacterMesh123 = Instance.new("CharacterMesh")
- CharacterMesh124 = Instance.new("CharacterMesh")
- Accessory125 = Instance.new("Accessory")
- Part126 = Instance.new("Part")
- SpecialMesh127 = Instance.new("SpecialMesh")
- Attachment128 = Instance.new("Attachment")
- CharacterMesh129 = Instance.new("CharacterMesh")
- Pants130 = Instance.new("Pants")
- Accessory131 = Instance.new("Accessory")
- Part132 = Instance.new("Part")
- SpecialMesh133 = Instance.new("SpecialMesh")
- Attachment134 = Instance.new("Attachment")
- Vector3Value135 = Instance.new("Vector3Value")
- Accessory136 = Instance.new("Accessory")
- Part137 = Instance.new("Part")
- SpecialMesh138 = Instance.new("SpecialMesh")
- Attachment139 = Instance.new("Attachment")
- Vector3Value140 = Instance.new("Vector3Value")
- Accessory141 = Instance.new("Accessory")
- Part142 = Instance.new("Part")
- SpecialMesh143 = Instance.new("SpecialMesh")
- Attachment144 = Instance.new("Attachment")
- Vector3Value145 = Instance.new("Vector3Value")
- CharacterMesh146 = Instance.new("CharacterMesh")
- CharacterMesh147 = Instance.new("CharacterMesh")
- Shirt148 = Instance.new("Shirt")
- BodyColors149 = Instance.new("BodyColors")
- Script150 = Instance.new("Script")
- Part151 = Instance.new("Part")
- Sound152 = Instance.new("Sound")
- LocalScript153 = Instance.new("LocalScript")
- Script154 = Instance.new("Script")
- Animation155 = Instance.new("Animation")
- Animation156 = Instance.new("Animation")
- Animation157 = Instance.new("Animation")
- Animation158 = Instance.new("Animation")
- Script159 = Instance.new("Script")
- Model160 = Instance.new("Model")
- Shirt161 = Instance.new("Shirt")
- Pants162 = Instance.new("Pants")
- BodyColors163 = Instance.new("BodyColors")
- Tool164 = Instance.new("Tool")
- Part165 = Instance.new("Part")
- Sound166 = Instance.new("Sound")
- SpecialMesh167 = Instance.new("SpecialMesh")
- Script168 = Instance.new("Script")
- Tool169 = Instance.new("Tool")
- Part170 = Instance.new("Part")
- SpecialMesh171 = Instance.new("SpecialMesh")
- Sound172 = Instance.new("Sound")
- Sound173 = Instance.new("Sound")
- Sound174 = Instance.new("Sound")
- Sound175 = Instance.new("Sound")
- Script176 = Instance.new("Script")
- Script177 = Instance.new("Script")
- ParticleEmitter178 = Instance.new("ParticleEmitter")
- Script179 = Instance.new("Script")
- LocalScript180 = Instance.new("LocalScript")
- LocalScript181 = Instance.new("LocalScript")
- Animation182 = Instance.new("Animation")
- Animation183 = Instance.new("Animation")
- Animation184 = Instance.new("Animation")
- Script185 = Instance.new("Script")
- Tool186 = Instance.new("Tool")
- RemoteEvent187 = Instance.new("RemoteEvent")
- NumberValue188 = Instance.new("NumberValue")
- Model189 = Instance.new("Model")
- Part190 = Instance.new("Part")
- SpecialMesh191 = Instance.new("SpecialMesh")
- Attachment192 = Instance.new("Attachment")
- Attachment193 = Instance.new("Attachment")
- Attachment194 = Instance.new("Attachment")
- Attachment195 = Instance.new("Attachment")
- Decal196 = Instance.new("Decal")
- Weld197 = Instance.new("Weld")
- Sound198 = Instance.new("Sound")
- Humanoid199 = Instance.new("Humanoid")
- Accessory200 = Instance.new("Accessory")
- Part201 = Instance.new("Part")
- SpecialMesh202 = Instance.new("SpecialMesh")
- Attachment203 = Instance.new("Attachment")
- Vector3Value204 = Instance.new("Vector3Value")
- Weld205 = Instance.new("Weld")
- Accessory206 = Instance.new("Accessory")
- Part207 = Instance.new("Part")
- SpecialMesh208 = Instance.new("SpecialMesh")
- Attachment209 = Instance.new("Attachment")
- Vector3Value210 = Instance.new("Vector3Value")
- Accessory211 = Instance.new("Accessory")
- Part212 = Instance.new("Part")
- SpecialMesh213 = Instance.new("SpecialMesh")
- Attachment214 = Instance.new("Attachment")
- Vector3Value215 = Instance.new("Vector3Value")
- Weld216 = Instance.new("Weld")
- Script217 = Instance.new("Script")
- Part218 = Instance.new("Part")
- Sound219 = Instance.new("Sound")
- LocalScript220 = Instance.new("LocalScript")
- Script221 = Instance.new("Script")
- Animation222 = Instance.new("Animation")
- Animation223 = Instance.new("Animation")
- Animation224 = Instance.new("Animation")
- Animation225 = Instance.new("Animation")
- Script226 = Instance.new("Script")
- Model227 = Instance.new("Model")
- Shirt228 = Instance.new("Shirt")
- Pants229 = Instance.new("Pants")
- BodyColors230 = Instance.new("BodyColors")
- Tool231 = Instance.new("Tool")
- RemoteEvent232 = Instance.new("RemoteEvent")
- NumberValue233 = Instance.new("NumberValue")
- Part234 = Instance.new("Part")
- Script235 = Instance.new("Script")
- Part236 = Instance.new("Part")
- Sound237 = Instance.new("Sound")
- LocalScript238 = Instance.new("LocalScript")
- Script239 = Instance.new("Script")
- Animation240 = Instance.new("Animation")
- Animation241 = Instance.new("Animation")
- Animation242 = Instance.new("Animation")
- Animation243 = Instance.new("Animation")
- Script244 = Instance.new("Script")
- Tool0.Name = "Animescapetower"
- Tool0.Parent = mas
- Tool0.GripForward = Vector3.new(-0, 1, -0)
- Tool0.GripRight = Vector3.new(0, 0, 1)
- Tool0.GripUp = Vector3.new(-1, 0, 0)
- Tool0.ToolTip = "These are heads"
- RemoteEvent1.Name = "Remote"
- RemoteEvent1.Parent = Tool0
- NumberValue2.Name = "Resistance"
- NumberValue2.Parent = Tool0
- NumberValue2.Value = 20
- Model3.Name = "Animescapetower"
- Model3.Parent = NumberValue2
- Part4.Name = "Head"
- Part4.Parent = Model3
- Part4.BrickColor = BrickColor.new("White")
- Part4.Rotation = Vector3.new(-180, 10, -180)
- Part4.FormFactor = Enum.FormFactor.Symmetric
- Part4.Size = Vector3.new(2, 1, 1)
- Part4.CFrame = CFrame.new(0.728771985, 4.49999905, 0.814302027, -0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, -0.984807849)
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part4.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Part4.Position = Vector3.new(0.728771985, 4.49999905, 0.814302027)
- Part4.Orientation = Vector3.new(0, 170, 0)
- Part4.Color = Color3.new(0.94902, 0.952941, 0.952941)
- SpecialMesh5.Parent = Part4
- SpecialMesh5.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh5.Scale = Vector3.new(1.25, 1.25, 1.25)
- Attachment6.Name = "HatAttachment"
- Attachment6.Parent = Part4
- Attachment6.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment6.Position = Vector3.new(0, 0.600000024, 0)
- Attachment7.Name = "HairAttachment"
- Attachment7.Parent = Part4
- Attachment7.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment7.Position = Vector3.new(0, 0.600000024, 0)
- Attachment8.Name = "FaceFrontAttachment"
- Attachment8.Parent = Part4
- Attachment8.CFrame = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment8.Position = Vector3.new(0, 0, -0.600000024)
- Attachment9.Name = "FaceCenterAttachment"
- Attachment9.Parent = Part4
- Decal10.Name = "face"
- Decal10.Parent = Part4
- Decal10.Texture = "http://www.roblox.com/asset/?id=10749222"
- BillboardGui11.Parent = Part4
- BillboardGui11.Size = UDim2.new(0, 200, 0, 50)
- TextLabel12.Parent = BillboardGui11
- TextLabel12.Transparency = 1
- TextLabel12.Size = UDim2.new(0, 100, 0, 400)
- TextLabel12.Text = "Animescapetower"
- TextLabel12.Position = UDim2.new(0, 0, 0, -300)
- TextLabel12.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel12.BackgroundTransparency = 1
- TextLabel12.Font = Enum.Font.SourceSans
- TextLabel12.FontSize = Enum.FontSize.Size14
- TextLabel12.TextColor3 = Color3.new(0, 1, 1)
- TextLabel12.TextScaled = true
- TextLabel12.TextStrokeTransparency = 0
- TextLabel12.TextWrapped = true
- Accessory13.Name = "2015Visor"
- Accessory13.Parent = Model3
- Accessory13.AttachmentPos = Vector3.new(0, 0.0900000036, 0.180000007)
- Part14.Name = "Handle"
- Part14.Parent = Accessory13
- Part14.Rotation = Vector3.new(-180, 10, -180)
- Part14.CanCollide = false
- Part14.FormFactor = Enum.FormFactor.Plate
- Part14.Size = Vector3.new(1, 0.400000006, 1)
- Part14.CFrame = CFrame.new(0.697564006, 4.90999889, 0.991302013, -0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, -0.984807849)
- Part14.BottomSurface = Enum.SurfaceType.Smooth
- Part14.TopSurface = Enum.SurfaceType.Smooth
- Part14.Position = Vector3.new(0.697564006, 4.90999889, 0.991302013)
- Part14.Orientation = Vector3.new(0, 170, 0)
- SpecialMesh15.Parent = Part14
- SpecialMesh15.MeshId = "http://www.roblox.com/asset/?id=1081088"
- SpecialMesh15.Scale = Vector3.new(1.01999998, 1.01999998, 1.01999998)
- SpecialMesh15.TextureId = "http://www.roblox.com/asset/?id=190253798 "
- SpecialMesh15.MeshType = Enum.MeshType.FileMesh
- SpecialMesh15.Scale = Vector3.new(1.01999998, 1.01999998, 1.01999998)
- Attachment16.Name = "HatAttachment"
- Attachment16.Parent = Part14
- Attachment16.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment16.CFrame = CFrame.new(8.65838956e-09, 0.190000057, 0.179727763, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment16.Position = Vector3.new(8.65838956e-09, 0.190000057, 0.179727763)
- Attachment16.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment16.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value17.Name = "OriginalSize"
- Vector3Value17.Parent = Part14
- Vector3Value17.Value = Vector3.new(1, 0.400000006, 1)
- Accessory18.Name = "8bitCatTail"
- Accessory18.Parent = Model3
- Accessory18.AttachmentPos = Vector3.new(0, 1.89999998, -0.899999976)
- Part19.Name = "Handle"
- Part19.Parent = Accessory18
- Part19.Rotation = Vector3.new(-180, 10, -180)
- Part19.CanCollide = false
- Part19.FormFactor = Enum.FormFactor.Symmetric
- Part19.Size = Vector3.new(1.24999964, 1.1500001, 1.24000001)
- Part19.CFrame = CFrame.new(0.885104001, 3.09999895, -0.0722889975, -0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, -0.984807849)
- Part19.BottomSurface = Enum.SurfaceType.Smooth
- Part19.TopSurface = Enum.SurfaceType.Smooth
- Part19.Position = Vector3.new(0.885104001, 3.09999895, -0.0722889975)
- Part19.Orientation = Vector3.new(0, 170, 0)
- SpecialMesh20.Parent = Part19
- SpecialMesh20.MeshId = "rbxassetid://542109971"
- SpecialMesh20.Scale = Vector3.new(0.699999988, 0.699999988, 0.699999988)
- SpecialMesh20.TextureId = "rbxassetid://542105636"
- SpecialMesh20.MeshType = Enum.MeshType.FileMesh
- SpecialMesh20.Scale = Vector3.new(0.699999988, 0.699999988, 0.699999988)
- Attachment21.Name = "WaistFrontAttachment"
- Attachment21.Parent = Part19
- Attachment21.Rotation = Vector3.new(0, 0, 3.91582454e-29)
- Attachment21.CFrame = CFrame.new(1.1920838e-07, -1.10000014, -1.40027213, 1, -6.83440315e-31, 0, 6.83440315e-31, 1, -0, 0, 0, 1)
- Attachment21.Position = Vector3.new(1.1920838e-07, -1.10000014, -1.40027213)
- Attachment21.Axis = Vector3.new(1, 6.83440315e-31, 0)
- Attachment21.Orientation = Vector3.new(0, 0, 3.91582454e-29)
- Accessory22.Name = "RainbowWings"
- Accessory22.Parent = Model3
- Accessory22.AttachmentPos = Vector3.new(0, 0.5, -1.04999995)
- Part23.Name = "Handle"
- Part23.Parent = Accessory22
- Part23.Transparency = 0.20000000298023
- Part23.Rotation = Vector3.new(-180, 10, -180)
- Part23.CanCollide = false
- Part23.FormFactor = Enum.FormFactor.Symmetric
- Part23.Size = Vector3.new(1, 1.41999996, 1)
- Part23.CFrame = CFrame.new(0.911149979, 4.49999905, -0.220008001, -0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, -0.984807849)
- Part23.BottomSurface = Enum.SurfaceType.Smooth
- Part23.TopSurface = Enum.SurfaceType.Smooth
- Part23.Position = Vector3.new(0.911149979, 4.49999905, -0.220008001)
- Part23.Orientation = Vector3.new(0, 170, 0)
- SpecialMesh24.Parent = Part23
- SpecialMesh24.MeshId = "http://www.roblox.com/asset/?id=335060772 "
- SpecialMesh24.TextureId = "http://www.roblox.com/asset/?id=335060906"
- SpecialMesh24.MeshType = Enum.MeshType.FileMesh
- Attachment25.Name = "BodyBackAttachment"
- Attachment25.Parent = Part23
- Attachment25.Rotation = Vector3.new(0, 0, 3.91582454e-29)
- Attachment25.CFrame = CFrame.new(-9.09494702e-13, -1.50000024, -0.550272346, 1, -6.83440315e-31, 0, 6.83440315e-31, 1, -0, 0, 0, 1)
- Attachment25.Position = Vector3.new(-9.09494702e-13, -1.50000024, -0.550272346)
- Attachment25.Axis = Vector3.new(1, 6.83440315e-31, 0)
- Attachment25.Orientation = Vector3.new(0, 0, 3.91582454e-29)
- Accessory26.Name = "Snake Eyes"
- Accessory26.Parent = Model3
- Accessory26.AttachmentPos = Vector3.new(0, 0.200000003, 0.300000012)
- Part27.Name = "Handle"
- Part27.Parent = Accessory26
- Part27.Rotation = Vector3.new(-180, 10, -180)
- Part27.CanCollide = false
- Part27.FormFactor = Enum.FormFactor.Plate
- Part27.Size = Vector3.new(2, 0.400000006, 1)
- Part27.CFrame = CFrame.new(0.676726997, 4.79999924, 1.109478, -0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, -0.984807849)
- Part27.BottomSurface = Enum.SurfaceType.Smooth
- Part27.TopSurface = Enum.SurfaceType.Smooth
- Part27.Position = Vector3.new(0.676726997, 4.79999924, 1.109478)
- Part27.Orientation = Vector3.new(0, 170, 0)
- SpecialMesh28.Parent = Part27
- SpecialMesh28.MeshId = "http://www.roblox.com/asset/?id=19380683"
- SpecialMesh28.TextureId = "http://www.roblox.com/asset/?id=19380684"
- SpecialMesh28.MeshType = Enum.MeshType.FileMesh
- Attachment29.Name = "FaceFrontAttachment"
- Attachment29.Parent = Part27
- Attachment29.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment29.CFrame = CFrame.new(3.93538357e-09, -0.300000191, -0.300272286, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment29.Position = Vector3.new(3.93538357e-09, -0.300000191, -0.300272286)
- Attachment29.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment29.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value30.Name = "OriginalSize"
- Vector3Value30.Parent = Part27
- Vector3Value30.Value = Vector3.new(2, 0.400000006, 1)
- Accessory31.Name = "CatHeadphones"
- Accessory31.Parent = Model3
- Accessory31.AttachmentPos = Vector3.new(0, 0.100000001, 0)
- Part32.Name = "Handle"
- Part32.Parent = Accessory31
- Part32.Rotation = Vector3.new(-180, 10, -180)
- Part32.CanCollide = false
- Part32.FormFactor = Enum.FormFactor.Symmetric
- Part32.Size = Vector3.new(1.61000013, 1.00000012, 1)
- Part32.CFrame = CFrame.new(0.728817999, 4.89999914, 0.814037979, -0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, -0.984807849)
- Part32.BottomSurface = Enum.SurfaceType.Smooth
- Part32.TopSurface = Enum.SurfaceType.Smooth
- Part32.Position = Vector3.new(0.728817999, 4.89999914, 0.814037979)
- Part32.Orientation = Vector3.new(0, 170, 0)
- SpecialMesh33.Parent = Part32
- SpecialMesh33.MeshId = "http://www.roblox.com/asset/?id=244661222 "
- SpecialMesh33.Scale = Vector3.new(2, 2, 2)
- SpecialMesh33.TextureId = "http://www.roblox.com/asset/?id=244661346 "
- SpecialMesh33.MeshType = Enum.MeshType.FileMesh
- SpecialMesh33.Scale = Vector3.new(2, 2, 2)
- Attachment34.Name = "HatAttachment"
- Attachment34.Parent = Part32
- Attachment34.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment34.CFrame = CFrame.new(8.65838956e-09, 0.199999809, -0.000272244215, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment34.Position = Vector3.new(8.65838956e-09, 0.199999809, -0.000272244215)
- Attachment34.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment34.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value35.Name = "OriginalSize"
- Vector3Value35.Parent = Part32
- Vector3Value35.Value = Vector3.new(1.61000013, 1.00000012, 1)
- ShirtGraphic36.Parent = Model3
- ShirtGraphic36.Graphic = "http://www.roblox.com/asset/?id=278664920"
- Accessory37.Name = "Ninjacat"
- Accessory37.Parent = Model3
- Accessory37.AttachmentPos = Vector3.new(0, 0.340000004, 0.25)
- Part38.Name = "Handle"
- Part38.Parent = Accessory37
- Part38.Rotation = Vector3.new(-180, 10, -180)
- Part38.CanCollide = false
- Part38.FormFactor = Enum.FormFactor.Custom
- Part38.Size = Vector3.new(1.60002756, 0.800000012, 1.59999776)
- Part38.CFrame = CFrame.new(-0.337150991, 4.59999895, 0.524811983, -0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, -0.984807849)
- Part38.BottomSurface = Enum.SurfaceType.Smooth
- Part38.TopSurface = Enum.SurfaceType.Smooth
- Part38.Position = Vector3.new(-0.337150991, 4.59999895, 0.524811983)
- Part38.Orientation = Vector3.new(0, 170, 0)
- SpecialMesh39.Parent = Part38
- SpecialMesh39.MeshId = "rbxassetid://752654188"
- SpecialMesh39.Scale = Vector3.new(0.899999976, 0.899999976, 0.899999976)
- SpecialMesh39.TextureId = "rbxassetid://752654439"
- SpecialMesh39.MeshType = Enum.MeshType.FileMesh
- SpecialMesh39.Scale = Vector3.new(0.899999976, 0.899999976, 0.899999976)
- Attachment40.Name = "RightCollarAttachment"
- Attachment40.Parent = Part38
- Attachment40.CFrame = CFrame.new(-0.100000001, -0.600000024, -0.100000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment40.Position = Vector3.new(-0.100000001, -0.600000024, -0.100000001)
- Pants41.Name = "Pants"
- Pants41.Parent = Model3
- Pants41.PantsTemplate = "http://www.roblox.com/asset/?id=278125378"
- Shirt42.Name = "Shirt"
- Shirt42.Parent = Model3
- Shirt42.ShirtTemplate = "http://www.roblox.com/asset/?id=380392822"
- Accessory43.Name = "MessyHairBlue"
- Accessory43.Parent = Model3
- Accessory43.AttachmentPos = Vector3.new(0.100000001, 0.400000006, -0.200000003)
- Part44.Name = "Handle"
- Part44.Parent = Accessory43
- Part44.Rotation = Vector3.new(-180, 10, -180)
- Part44.CanCollide = false
- Part44.FormFactor = Enum.FormFactor.Custom
- Part44.Size = Vector3.new(1.99999928, 1.79999995, 2.00000024)
- Part44.CFrame = CFrame.new(0.862030029, 4.59999895, 0.634437978, -0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, -0.984807849)
- Part44.BottomSurface = Enum.SurfaceType.Smooth
- Part44.TopSurface = Enum.SurfaceType.Smooth
- Part44.Position = Vector3.new(0.862030029, 4.59999895, 0.634437978)
- Part44.Orientation = Vector3.new(0, 170, 0)
- SpecialMesh45.Parent = Part44
- SpecialMesh45.MeshId = "http://www.roblox.com/asset/?id=76056263"
- SpecialMesh45.TextureId = "http://www.roblox.com/asset/?id=76055088"
- SpecialMesh45.MeshType = Enum.MeshType.FileMesh
- Attachment46.Name = "HairAttachment"
- Attachment46.Parent = Part44
- Attachment46.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment46.CFrame = CFrame.new(0.100000009, 0.5, -0.200272247, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment46.Position = Vector3.new(0.100000009, 0.5, -0.200272247)
- Attachment46.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment46.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value47.Name = "OriginalSize"
- Vector3Value47.Parent = Part44
- Vector3Value47.Value = Vector3.new(1.99999928, 1.79999995, 2.00000024)
- BodyColors48.Parent = Model3
- BodyColors48.HeadColor = BrickColor.new("White")
- BodyColors48.LeftArmColor = BrickColor.new("White")
- BodyColors48.LeftLegColor = BrickColor.new("White")
- BodyColors48.RightArmColor = BrickColor.new("White")
- BodyColors48.RightLegColor = BrickColor.new("White")
- BodyColors48.TorsoColor = BrickColor.new("Institutional white")
- Script49.Name = "qPerfectionWeld"
- Script49.Parent = Tool0
- table.insert(cors,sandbox(Script49,function()
- -- Created by Quenty (@Quenty, follow me on twitter).
- -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
- -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
- --[[ INSTRUCTIONS
- - Place in the model
- - Make sure model is anchored
- - That's it. It will weld the model and all children.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- 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.
- ]]
- --[[ DOCUMENTATION
- - 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.
- - Will work in PBS servers
- - Will work as long as it starts out with the part anchored
- - Stores the relative CFrame as a CFrame value
- - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
- - Utilizes a recursive algorith to find all parts in the model
- - Will reweld on script reparent if the script is initially parented to a tool.
- - Welds as fast as possible
- ]]
- -- qPerfectionWeld.lua
- -- Created 10/6/2014
- -- Author: Quenty
- -- Version 1.0.3
- -- Updated 10/14/2014 - Updated to 1.0.1
- --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
- -- Updated 10/14/2014 - Updated to 1.0.2
- --- Fixed bug fix.
- -- Updated 10/14/2014 - Updated to 1.0.3
- --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
- 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).
- local function CallOnChildren(Instance, FunctionToCall)
- -- Calls a function on each of the children of a certain object, using recursion.
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- CallOnChildren(Child, FunctionToCall)
- end
- end
- local function GetNearestParent(Instance, ClassName)
- -- Returns the nearest parent of a certain class, or returns nil
- local Ancestor = Instance
- repeat
- Ancestor = Ancestor.Parent
- if Ancestor == nil then
- return nil
- end
- until Ancestor:IsA(ClassName)
- return Ancestor
- end
- local function GetBricks(StartInstance)
- local List = {}
- -- if StartInstance:IsA("BasePart") then
- -- List[#List+1] = StartInstance
- -- end
- CallOnChildren(StartInstance, function(Item)
- if Item:IsA("BasePart") then
- List[#List+1] = Item;
- end
- end)
- return List
- end
- local function Modify(Instance, Values)
- -- Modifies an Instance by using a table.
- assert(type(Values) == "table", "Values is not a table");
- for Index, Value in next, Values do
- if type(Index) == "number" then
- Value.Parent = Instance
- else
- Instance[Index] = Value
- end
- end
- return Instance
- end
- local function Make(ClassType, Properties)
- -- Using a syntax hack to create a nice way to Make new items.
- return Modify(Instance.new(ClassType), Properties)
- end
- local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
- local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
- local function HasWheelJoint(Part)
- for _, SurfaceName in pairs(Surfaces) do
- for _, HingSurfaceName in pairs(HingSurfaces) do
- if Part[SurfaceName].Name == HingSurfaceName then
- return true
- end
- end
- end
- return false
- end
- local function ShouldBreakJoints(Part)
- --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
- -- definitely some edge cases.
- if NEVER_BREAK_JOINTS then
- return false
- end
- if HasWheelJoint(Part) then
- return false
- end
- local Connected = Part:GetConnectedParts()
- if #Connected == 1 then
- return false
- end
- for _, Item in pairs(Connected) do
- if HasWheelJoint(Item) then
- return false
- elseif not Item:IsDescendantOf(script.Parent) then
- return false
- end
- end
- return true
- end
- local function WeldTogether(Part0, Part1, JointType, WeldParent)
- --- Weld's 2 parts together
- -- @param Part0 The first part
- -- @param Part1 The second part (Dependent part most of the time).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
- -- @return The weld created.
- JointType = JointType or "Weld"
- local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
- local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
- Modify(NewWeld, {
- Name = "qCFrameWeldThingy";
- Part0 = Part0;
- Part1 = Part1;
- C0 = CFrame.new();--Part0.CFrame:inverse();
- C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
- Parent = Part1;
- })
- if not RelativeValue then
- RelativeValue = Make("CFrameValue", {
- Parent = Part1;
- Name = "qRelativeCFrameWeldValue";
- Archivable = true;
- Value = NewWeld.C1;
- })
- end
- return NewWeld
- end
- local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
- -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
- -- @param MainPart The part to weld the model to (can be in the model).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
- for _, Part in pairs(Parts) do
- if ShouldBreakJoints(Part) then
- Part:BreakJoints()
- end
- end
- for _, Part in pairs(Parts) do
- if Part ~= MainPart then
- WeldTogether(MainPart, Part, JointType, MainPart)
- end
- end
- if not DoNotUnanchor then
- for _, Part in pairs(Parts) do
- Part.Anchored = false
- end
- MainPart.Anchored = false
- end
- end
- local function PerfectionWeld()
- local Tool = GetNearestParent(script, "Tool")
- local Parts = GetBricks(script.Parent)
- 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]
- if PrimaryPart then
- WeldParts(Parts, PrimaryPart, "Weld", false)
- else
- warn("qWeld - Unable to weld part")
- end
- return Tool
- end
- local Tool = PerfectionWeld()
- if Tool and script.ClassName == "Script" then
- --- Don't bother with local scripts
- script.Parent.AncestryChanged:connect(function()
- PerfectionWeld()
- end)
- end
- -- Created by Quenty (@Quenty, follow me on twitter).
- end))
- Part50.Name = "Handle"
- Part50.Parent = Tool0
- Part50.Material = Enum.Material.Metal
- Part50.BrickColor = BrickColor.new("Toothpaste")
- Part50.Transparency = 1
- Part50.Rotation = Vector3.new(0, -87.7399979, -90)
- Part50.Anchored = true
- Part50.CanCollide = false
- Part50.FormFactor = Enum.FormFactor.Custom
- Part50.Size = Vector3.new(0.200000003, 0.573924482, 1)
- Part50.CFrame = CFrame.new(0.0249101222, 4.33820772, 0.185504228, 0, 0.0394580103, -0.999221265, -1, 0, 0, 0, 0.999221265, 0.0394580103)
- Part50.Color = Color3.new(0, 1, 1)
- Part50.Position = Vector3.new(0.0249101222, 4.33820772, 0.185504228)
- Part50.Orientation = Vector3.new(0, -87.7399979, -90)
- Part50.Color = Color3.new(0, 1, 1)
- Sound51.Name = "AnimeMusic"
- Sound51.Parent = Part50
- Sound51.SoundId = "rbxassetid://692507500"
- Sound51.Volume = 10
- Sound51.Looped = true
- LocalScript52.Name = "Client"
- LocalScript52.Parent = Tool0
- table.insert(cors,sandbox(LocalScript52,function()
- local Player = game:GetService("Players").LocalPlayer
- while not Player.Character do wait() end
- local Character = Player.Character
- local Human = Character:WaitForChild("Humanoid")
- local CAS = game:GetService("ContextActionService")
- local ActionName = "GiantAngelicSword"
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Animations = {
- Hold = Tool:WaitForChild("Hold"),
- Slam = Tool:WaitForChild("Slam"),
- SwingRightToLeft = Tool:WaitForChild("SwingRightToLeft"),
- SwingLeftToRight = Tool:WaitForChild("SwingLeftToRight"),
- }
- local HoldTrack
- function playAnimation(name, fade, weight, speed)
- if Animations[name] then
- local track = Human:LoadAnimation(Animations[name])
- track:Play(fade, weight, speed)
- end
- end
- function onAction(actionName, inputState, inputObject)
- if inputState == Enum.UserInputState.Begin then
- Remote:FireServer("Attack")
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --animate
- HoldTrack = Human:LoadAnimation(Animations.Hold)
- HoldTrack:Play(0.5)
- --bind actions
- CAS:BindActionToInputTypes(
- ActionName,
- onAction,
- false,
- Enum.UserInputType.MouseButton1,
- Enum.UserInputType.Touch
- )
- end
- function onUnequipped()
- --unbind
- CAS:UnbindAction(ActionName)
- --stop animation
- if HoldTrack then
- HoldTrack:Stop()
- end
- end
- function onRemote(func, ...)
- if func == "PlayAnimation" then
- playAnimation(...)
- end
- end
- --set up events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnClientEvent:connect(onRemote)
- end))
- Script53.Name = "Server"
- Script53.Parent = Tool0
- table.insert(cors,sandbox(Script53,function()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Handle = Tool:WaitForChild("Handle")
- local Motor
- local AttackNumber = 1
- local AttackDamage = 50
- local AttackWindow = 0.6
- local AttackRest = 0
- local AttackAble = true
- local AttackDamaging = true
- local AttackHit = {}
- function getPlayerChar()
- local char = Tool.Parent
- local player = game:GetService("Players"):GetPlayerFromCharacter(char)
- return player, char
- end
- function convertWeldToMotor(weld)
- local m = Instance.new("Motor6D")
- m.Name = weld.Name
- m.Part0 = weld.Part0
- m.Part1 = weld.Part1
- m.C0 = weld.C0
- m.C1 = weld.C1
- local parent = weld.Parent
- weld:Destroy()
- m.Parent = parent
- Motor = m
- end
- function changeGrip()
- local player, char = getPlayerChar()
- while not char:FindFirstChild("Right Arm") do wait() end
- while not char["Right Arm"]:FindFirstChild("RightGrip") do wait() end
- convertWeldToMotor(char["Right Arm"].RightGrip)
- end
- function contains(t, v)
- for _, val in pairs(t) do
- if val == v then
- return true
- end
- end
- return false
- end
- function tagHuman(human)
- local player, char = getPlayerChar()
- local val = Instance.new("ObjectValue")
- val.Name = "creator"
- val.Value = player
- val.Parent = human
- game:GetService("Debris"):AddItem(val, 1)
- end
- function openAttackWindow()
- AttackHit = {}
- AttackDamaging = true
- delay(AttackWindow, function()
- AttackDamaging = false
- end)
- end
- function onTouched(part)
- if not AttackDamaging then return end
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- local pitch = math.random(60, 80)/100
- playSound("HitSound", pitch, 1)
- playSound("HitSound2", pitch + 0.3, 1)
- end
- end
- end
- function onTouchedSpecial(part)
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- end
- end
- end
- function special()
- local player, char = getPlayerChar()
- local root = char:FindFirstChild("Zombie")
- if root then
- openAttackWindow()
- local c = root.CFrame
- local dz = -8
- for t = 0, 1, 1/15 do
- delay(t, function()
- local pos = c:pointToWorldSpace(Vector3.new(0, -2.5, dz))
- local e = Instance.new("Explosion")
- e.BlastPressure = 0
- e.Position = pos
- e.Hit:connect(onTouchedSpecial)
- e.Parent = workspace
- dz = dz - 6
- end)
- end
- playSound("Explosion", 0.9, 1)
- end
- end
- function playSound(name, pitch, volume)
- local sound = Handle:FindFirstChild(name)
- if sound then
- sound.Pitch = pitch or math.random(90, 110)/100
- sound.Volume = volume or 0.5
- sound:Play()
- end
- end
- function attack()
- if not AttackAble then return end
- AttackAble = false
- delay(AttackRest, function()
- AttackAble = true
- end)
- local player, char = getPlayerChar()
- if AttackNumber < 5 then
- if AttackNumber == 1 or AttackNumber == 3 then
- Remote:FireClient(player, "PlayAnimation", "SwingRightToLeft")
- elseif AttackNumber == 2 or AttackNumber == 4 then
- Remote:FireClient(player, "PlayAnimation", "SwingLeftToRight")
- end
- openAttackWindow()
- playSound("SwingSound")
- else
- AttackNumber = 0
- end
- AttackNumber = AttackNumber + 1
- end
- function onRemote(callingPlayer, func, ...)
- local player, char = getPlayerChar()
- if callingPlayer == player then
- if func == "Attack" then
- attack()
- end
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --convert grip to a motor
- changeGrip()
- end
- function onUnequipped()
- if Motor then
- Motor:Destroy()
- end
- end
- --connect events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnServerEvent:connect(onRemote)
- Handle.Touched:connect(onTouched)
- end))
- Animation54.Name = "SwingRightToLeft"
- Animation54.Parent = Tool0
- Animation54.AnimationId = "http://www.roblox.com/asset/?id=184573779"
- Animation55.Name = "SwingLeftToRight"
- Animation55.Parent = Tool0
- Animation55.AnimationId = "http://www.roblox.com/asset/?id=184573748"
- Animation56.Name = "Slam"
- Animation56.Parent = Tool0
- Animation56.AnimationId = "http://www.roblox.com/asset/?id=184574340"
- Animation57.Name = "Hold"
- Animation57.Parent = Tool0
- Animation57.AnimationId = "http://www.roblox.com/asset/?id=184572142"
- Script58.Parent = Tool0
- table.insert(cors,sandbox(Script58,function()
- function LOL()
- script.Parent.Handle.AnimeMusic:Play()
- end
- function LOL2()
- script.Parent.Handle.AnimeMusic:Stop()
- end
- script.Parent.Equipped:connect(LOL)
- script.Parent.Unequipped:connect(LOL2)
- end))
- Model59.Name = "Resyncable"
- Model59.Parent = Tool0
- Shirt60.Name = "Shirt"
- Shirt60.Parent = Tool0
- Shirt60.ShirtTemplate = "http://www.roblox.com/asset/?id=41770216"
- Pants61.Name = "Pants"
- Pants61.Parent = Tool0
- Pants61.PantsTemplate = "http://www.roblox.com/asset/?id=45721839"
- BodyColors62.Parent = Tool0
- BodyColors62.HeadColor = BrickColor.new("Cyan")
- BodyColors62.LeftArmColor = BrickColor.new("Cyan")
- BodyColors62.LeftLegColor = BrickColor.new("Cyan")
- BodyColors62.RightArmColor = BrickColor.new("Cyan")
- BodyColors62.RightLegColor = BrickColor.new("Cyan")
- BodyColors62.TorsoColor = BrickColor.new("Cyan")
- Tool63.Name = "Artic"
- Tool63.Parent = mas
- Tool63.GripForward = Vector3.new(-0, 1, -0)
- Tool63.GripRight = Vector3.new(0, 0, 1)
- Tool63.GripUp = Vector3.new(-1, 0, 0)
- Tool63.ToolTip = "My friends head"
- RemoteEvent64.Name = "Remote"
- RemoteEvent64.Parent = Tool63
- NumberValue65.Name = "Resistance"
- NumberValue65.Parent = Tool63
- NumberValue65.Value = 20
- Model66.Name = "FuntimeArtic"
- Model66.Parent = NumberValue65
- Part67.Name = "Head"
- Part67.Parent = Model66
- Part67.BrickColor = BrickColor.new("Pastel yellow")
- Part67.Rotation = Vector3.new(-180, 0, -180)
- Part67.FormFactor = Enum.FormFactor.Symmetric
- Part67.Size = Vector3.new(2, 1, 1)
- Part67.CFrame = CFrame.new(-6.6300478, 6.0457325, -146.639496, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part67.TopSurface = Enum.SurfaceType.Smooth
- Part67.Color = Color3.new(1, 1, 0.8)
- Part67.Position = Vector3.new(-6.6300478, 6.0457325, -146.639496)
- Part67.Orientation = Vector3.new(0, 180, 0)
- Part67.Color = Color3.new(1, 1, 0.8)
- SpecialMesh68.Parent = Part67
- SpecialMesh68.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh68.Scale = Vector3.new(1.25, 1.25, 1.25)
- Attachment69.Name = "HatAttachment"
- Attachment69.Parent = Part67
- Attachment69.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment69.Position = Vector3.new(0, 0.600000024, 0)
- Attachment70.Name = "HairAttachment"
- Attachment70.Parent = Part67
- Attachment70.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment70.Position = Vector3.new(0, 0.600000024, 0)
- Attachment71.Name = "FaceFrontAttachment"
- Attachment71.Parent = Part67
- Attachment71.CFrame = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment71.Position = Vector3.new(0, 0, -0.600000024)
- Attachment72.Name = "FaceCenterAttachment"
- Attachment72.Parent = Part67
- Decal73.Name = "face"
- Decal73.Parent = Part67
- Decal73.Texture = "http://www.roblox.com/asset/?id=22828283"
- BillboardGui74.Parent = Part67
- BillboardGui74.Size = UDim2.new(0, 200, 0, 50)
- TextLabel75.Parent = BillboardGui74
- TextLabel75.Transparency = 1
- TextLabel75.Size = UDim2.new(0, 200, 0, 50)
- TextLabel75.Text = "Artic"
- TextLabel75.Position = UDim2.new(0, 0, 0, -40)
- TextLabel75.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel75.BackgroundTransparency = 1
- TextLabel75.Font = Enum.Font.SourceSans
- TextLabel75.FontSize = Enum.FontSize.Size14
- TextLabel75.TextColor3 = Color3.new(0, 1, 1)
- TextLabel75.TextScaled = true
- TextLabel75.TextStrokeTransparency = 0
- TextLabel75.TextWrapped = true
- Accessory76.Name = "FriendlySnowfOX"
- Accessory76.Parent = Model66
- Accessory76.AttachmentPos = Vector3.new(0, 1.79999995, 0)
- Part77.Name = "Handle"
- Part77.Parent = Accessory76
- Part77.Rotation = Vector3.new(-180, 0, -180)
- Part77.CanCollide = false
- Part77.FormFactor = Enum.FormFactor.Custom
- Part77.Size = Vector3.new(0.720027149, 1.31999815, 1.91000271)
- Part77.CFrame = CFrame.new(-7.6300478, 6.19573259, -146.739502, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part77.BottomSurface = Enum.SurfaceType.Smooth
- Part77.TopSurface = Enum.SurfaceType.Smooth
- Part77.Position = Vector3.new(-7.6300478, 6.19573259, -146.739502)
- Part77.Orientation = Vector3.new(0, 180, 0)
- SpecialMesh78.Parent = Part77
- SpecialMesh78.MeshId = "rbxassetid://1241037817"
- SpecialMesh78.TextureId = "rbxassetid://1241038471"
- SpecialMesh78.MeshType = Enum.MeshType.FileMesh
- Attachment79.Name = "RightCollarAttachment"
- Attachment79.Parent = Part77
- Attachment79.CFrame = CFrame.new(0, -0.649999976, -0.100000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment79.Position = Vector3.new(0, -0.649999976, -0.100000001)
- Accessory80.Name = "NeonBlueAnimalHood"
- Accessory80.Parent = Model66
- Accessory80.AttachmentPos = Vector3.new(0, -0.0299999993, 0.0500000007)
- Part81.Name = "Handle"
- Part81.Parent = Accessory80
- Part81.Rotation = Vector3.new(-180, 0, -180)
- Part81.CanCollide = false
- Part81.FormFactor = Enum.FormFactor.Custom
- Part81.Size = Vector3.new(2.6000278, 2.20000005, 1.79999816)
- Part81.CFrame = CFrame.new(-6.6300478, 6.57573271, -146.589767, -1, 7.87137555e-09, 0, 7.87137555e-09, 1, 4.1444221e-16, 3.26223034e-24, 4.1444221e-16, -1)
- Part81.BottomSurface = Enum.SurfaceType.Smooth
- Part81.TopSurface = Enum.SurfaceType.Smooth
- Part81.Position = Vector3.new(-6.6300478, 6.57573271, -146.589767)
- Part81.Orientation = Vector3.new(0, 180, 0)
- SpecialMesh82.Parent = Part81
- SpecialMesh82.MeshId = "http://www.roblox.com/asset/?id=135446047 "
- SpecialMesh82.Scale = Vector3.new(1, 1.10000002, 1)
- SpecialMesh82.TextureId = "http://www.roblox.com/asset/?id=273374941 "
- SpecialMesh82.MeshType = Enum.MeshType.FileMesh
- SpecialMesh82.Scale = Vector3.new(1, 1.10000002, 1)
- Attachment83.Name = "HatAttachment"
- Attachment83.Parent = Part81
- Attachment83.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment83.CFrame = CFrame.new(8.65748007e-09, 0.0699996948, 0.0497277565, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment83.Position = Vector3.new(8.65748007e-09, 0.0699996948, 0.0497277565)
- Attachment83.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment83.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value84.Name = "OriginalSize"
- Vector3Value84.Parent = Part81
- Vector3Value84.Value = Vector3.new(2.6000278, 2.20000005, 1.79999816)
- Weld85.Name = "AccessoryWeld"
- Weld85.Parent = Part81
- Weld85.C0 = CFrame.new(8.65748007e-09, 0.0699996948, 0.0497277565, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Weld85.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld85.Part0 = Part81
- Weld85.Part1 = Part67
- Accessory86.Name = "RainbowWings"
- Accessory86.Parent = Model66
- Accessory86.AttachmentPos = Vector3.new(0, 0.5, -1.04999995)
- Part87.Name = "Handle"
- Part87.Parent = Accessory86
- Part87.Transparency = 0.20000000298023
- Part87.Rotation = Vector3.new(-180, 0, 180)
- Part87.CanCollide = false
- Part87.FormFactor = Enum.FormFactor.Symmetric
- Part87.Size = Vector3.new(1, 1.41999996, 1)
- Part87.CFrame = CFrame.new(-6.6300478, 6.0457325, -147.689774, -1, -6.83440315e-31, 0, -6.83440315e-31, 1, 0, 0, 0, -1)
- Part87.BottomSurface = Enum.SurfaceType.Smooth
- Part87.TopSurface = Enum.SurfaceType.Smooth
- Part87.Position = Vector3.new(-6.6300478, 6.0457325, -147.689774)
- Part87.Orientation = Vector3.new(0, 180, 0)
- SpecialMesh88.Parent = Part87
- SpecialMesh88.MeshId = "http://www.roblox.com/asset/?id=335060772 "
- SpecialMesh88.TextureId = "http://www.roblox.com/asset/?id=335060906"
- SpecialMesh88.MeshType = Enum.MeshType.FileMesh
- Attachment89.Name = "BodyBackAttachment"
- Attachment89.Parent = Part87
- Attachment89.Rotation = Vector3.new(0, 0, 3.91582454e-29)
- Attachment89.CFrame = CFrame.new(-9.09494702e-13, -1.50000024, -0.550272346, 1, -6.83440315e-31, 0, 6.83440315e-31, 1, -0, 0, 0, 1)
- Attachment89.Position = Vector3.new(-9.09494702e-13, -1.50000024, -0.550272346)
- Attachment89.Axis = Vector3.new(1, 6.83440315e-31, 0)
- Attachment89.Orientation = Vector3.new(0, 0, 3.91582454e-29)
- Accessory90.Name = "ArcticFoxHead"
- Accessory90.Parent = Model66
- Accessory90.AttachmentPos = Vector3.new(0, 0.119999997, 0.300000012)
- Part91.Name = "Handle"
- Part91.Parent = Accessory90
- Part91.Rotation = Vector3.new(-180, 0, -180)
- Part91.CanCollide = false
- Part91.FormFactor = Enum.FormFactor.Custom
- Part91.Size = Vector3.new(1.8600266, 2.2399981, 2.0999999)
- Part91.CFrame = CFrame.new(-6.6300478, 6.42573261, -146.339767, -1, 7.87137555e-09, 0, 7.87137555e-09, 1, 4.1444221e-16, 3.26223034e-24, 4.1444221e-16, -1)
- Part91.BottomSurface = Enum.SurfaceType.Smooth
- Part91.TopSurface = Enum.SurfaceType.Smooth
- Part91.Position = Vector3.new(-6.6300478, 6.42573261, -146.339767)
- Part91.Orientation = Vector3.new(0, 180, 0)
- SpecialMesh92.Parent = Part91
- SpecialMesh92.MeshId = "http://www.roblox.com/asset/?id=188699722 "
- SpecialMesh92.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
- SpecialMesh92.TextureId = "http://www.roblox.com/asset/?id=188699768 "
- SpecialMesh92.MeshType = Enum.MeshType.FileMesh
- SpecialMesh92.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
- Attachment93.Name = "HatAttachment"
- Attachment93.Parent = Part91
- Attachment93.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment93.CFrame = CFrame.new(8.65748007e-09, 0.21999979, 0.299727768, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment93.Position = Vector3.new(8.65748007e-09, 0.21999979, 0.299727768)
- Attachment93.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment93.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value94.Name = "OriginalSize"
- Vector3Value94.Parent = Part91
- Vector3Value94.Value = Vector3.new(1.8600266, 2.2399981, 2.0999999)
- Weld95.Name = "AccessoryWeld"
- Weld95.Parent = Part91
- Weld95.C0 = CFrame.new(8.65748007e-09, 0.21999979, 0.299727768, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Weld95.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld95.Part0 = Part91
- Weld95.Part1 = Part67
- Script96.Name = "qPerfectionWeld"
- Script96.Parent = Tool63
- table.insert(cors,sandbox(Script96,function()
- -- Created by Quenty (@Quenty, follow me on twitter).
- -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
- -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
- --[[ INSTRUCTIONS
- - Place in the model
- - Make sure model is anchored
- - That's it. It will weld the model and all children.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- 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.
- ]]
- --[[ DOCUMENTATION
- - 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.
- - Will work in PBS servers
- - Will work as long as it starts out with the part anchored
- - Stores the relative CFrame as a CFrame value
- - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
- - Utilizes a recursive algorith to find all parts in the model
- - Will reweld on script reparent if the script is initially parented to a tool.
- - Welds as fast as possible
- ]]
- -- qPerfectionWeld.lua
- -- Created 10/6/2014
- -- Author: Quenty
- -- Version 1.0.3
- -- Updated 10/14/2014 - Updated to 1.0.1
- --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
- -- Updated 10/14/2014 - Updated to 1.0.2
- --- Fixed bug fix.
- -- Updated 10/14/2014 - Updated to 1.0.3
- --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
- 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).
- local function CallOnChildren(Instance, FunctionToCall)
- -- Calls a function on each of the children of a certain object, using recursion.
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- CallOnChildren(Child, FunctionToCall)
- end
- end
- local function GetNearestParent(Instance, ClassName)
- -- Returns the nearest parent of a certain class, or returns nil
- local Ancestor = Instance
- repeat
- Ancestor = Ancestor.Parent
- if Ancestor == nil then
- return nil
- end
- until Ancestor:IsA(ClassName)
- return Ancestor
- end
- local function GetBricks(StartInstance)
- local List = {}
- -- if StartInstance:IsA("BasePart") then
- -- List[#List+1] = StartInstance
- -- end
- CallOnChildren(StartInstance, function(Item)
- if Item:IsA("BasePart") then
- List[#List+1] = Item;
- end
- end)
- return List
- end
- local function Modify(Instance, Values)
- -- Modifies an Instance by using a table.
- assert(type(Values) == "table", "Values is not a table");
- for Index, Value in next, Values do
- if type(Index) == "number" then
- Value.Parent = Instance
- else
- Instance[Index] = Value
- end
- end
- return Instance
- end
- local function Make(ClassType, Properties)
- -- Using a syntax hack to create a nice way to Make new items.
- return Modify(Instance.new(ClassType), Properties)
- end
- local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
- local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
- local function HasWheelJoint(Part)
- for _, SurfaceName in pairs(Surfaces) do
- for _, HingSurfaceName in pairs(HingSurfaces) do
- if Part[SurfaceName].Name == HingSurfaceName then
- return true
- end
- end
- end
- return false
- end
- local function ShouldBreakJoints(Part)
- --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
- -- definitely some edge cases.
- if NEVER_BREAK_JOINTS then
- return false
- end
- if HasWheelJoint(Part) then
- return false
- end
- local Connected = Part:GetConnectedParts()
- if #Connected == 1 then
- return false
- end
- for _, Item in pairs(Connected) do
- if HasWheelJoint(Item) then
- return false
- elseif not Item:IsDescendantOf(script.Parent) then
- return false
- end
- end
- return true
- end
- local function WeldTogether(Part0, Part1, JointType, WeldParent)
- --- Weld's 2 parts together
- -- @param Part0 The first part
- -- @param Part1 The second part (Dependent part most of the time).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
- -- @return The weld created.
- JointType = JointType or "Weld"
- local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
- local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
- Modify(NewWeld, {
- Name = "qCFrameWeldThingy";
- Part0 = Part0;
- Part1 = Part1;
- C0 = CFrame.new();--Part0.CFrame:inverse();
- C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
- Parent = Part1;
- })
- if not RelativeValue then
- RelativeValue = Make("CFrameValue", {
- Parent = Part1;
- Name = "qRelativeCFrameWeldValue";
- Archivable = true;
- Value = NewWeld.C1;
- })
- end
- return NewWeld
- end
- local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
- -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
- -- @param MainPart The part to weld the model to (can be in the model).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
- for _, Part in pairs(Parts) do
- if ShouldBreakJoints(Part) then
- Part:BreakJoints()
- end
- end
- for _, Part in pairs(Parts) do
- if Part ~= MainPart then
- WeldTogether(MainPart, Part, JointType, MainPart)
- end
- end
- if not DoNotUnanchor then
- for _, Part in pairs(Parts) do
- Part.Anchored = false
- end
- MainPart.Anchored = false
- end
- end
- local function PerfectionWeld()
- local Tool = GetNearestParent(script, "Tool")
- local Parts = GetBricks(script.Parent)
- 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]
- if PrimaryPart then
- WeldParts(Parts, PrimaryPart, "Weld", false)
- else
- warn("qWeld - Unable to weld part")
- end
- return Tool
- end
- local Tool = PerfectionWeld()
- if Tool and script.ClassName == "Script" then
- --- Don't bother with local scripts
- script.Parent.AncestryChanged:connect(function()
- PerfectionWeld()
- end)
- end
- -- Created by Quenty (@Quenty, follow me on twitter).
- end))
- Part97.Name = "Handle"
- Part97.Parent = Tool63
- Part97.Material = Enum.Material.Metal
- Part97.BrickColor = BrickColor.new("Toothpaste")
- Part97.Transparency = 1
- Part97.Rotation = Vector3.new(0, -87.7399979, -90)
- Part97.Anchored = true
- Part97.CanCollide = false
- Part97.FormFactor = Enum.FormFactor.Custom
- Part97.Size = Vector3.new(0.200000003, 0.573924482, 1)
- Part97.CFrame = CFrame.new(-6.75885677, 7.13820505, -146.26091, 0, 0.0394580103, -0.999221265, -1, 0, 0, 0, 0.999221265, 0.0394580103)
- Part97.Color = Color3.new(0, 1, 1)
- Part97.Position = Vector3.new(-6.75885677, 7.13820505, -146.26091)
- Part97.Orientation = Vector3.new(0, -87.7399979, -90)
- Part97.Color = Color3.new(0, 1, 1)
- Sound98.Name = "AnimeMusic"
- Sound98.Parent = Part97
- Sound98.SoundId = "rbxassetid://1273944801"
- Sound98.Volume = 10
- Sound98.Looped = true
- LocalScript99.Name = "Client"
- LocalScript99.Parent = Tool63
- table.insert(cors,sandbox(LocalScript99,function()
- local Player = game:GetService("Players").LocalPlayer
- while not Player.Character do wait() end
- local Character = Player.Character
- local Human = Character:WaitForChild("Humanoid")
- local CAS = game:GetService("ContextActionService")
- local ActionName = "GiantAngelicSword"
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Animations = {
- Hold = Tool:WaitForChild("Hold"),
- Slam = Tool:WaitForChild("Slam"),
- SwingRightToLeft = Tool:WaitForChild("SwingRightToLeft"),
- SwingLeftToRight = Tool:WaitForChild("SwingLeftToRight"),
- }
- local HoldTrack
- function playAnimation(name, fade, weight, speed)
- if Animations[name] then
- local track = Human:LoadAnimation(Animations[name])
- track:Play(fade, weight, speed)
- end
- end
- function onAction(actionName, inputState, inputObject)
- if inputState == Enum.UserInputState.Begin then
- Remote:FireServer("Attack")
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --animate
- HoldTrack = Human:LoadAnimation(Animations.Hold)
- HoldTrack:Play(0.5)
- --bind actions
- CAS:BindActionToInputTypes(
- ActionName,
- onAction,
- false,
- Enum.UserInputType.MouseButton1,
- Enum.UserInputType.Touch
- )
- end
- function onUnequipped()
- --unbind
- CAS:UnbindAction(ActionName)
- --stop animation
- if HoldTrack then
- HoldTrack:Stop()
- end
- end
- function onRemote(func, ...)
- if func == "PlayAnimation" then
- playAnimation(...)
- end
- end
- --set up events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnClientEvent:connect(onRemote)
- end))
- Script100.Name = "Server"
- Script100.Parent = Tool63
- table.insert(cors,sandbox(Script100,function()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Handle = Tool:WaitForChild("Handle")
- local Motor
- local AttackNumber = 1
- local AttackDamage = 50
- local AttackWindow = 0.6
- local AttackRest = 0
- local AttackAble = true
- local AttackDamaging = true
- local AttackHit = {}
- function getPlayerChar()
- local char = Tool.Parent
- local player = game:GetService("Players"):GetPlayerFromCharacter(char)
- return player, char
- end
- function convertWeldToMotor(weld)
- local m = Instance.new("Motor6D")
- m.Name = weld.Name
- m.Part0 = weld.Part0
- m.Part1 = weld.Part1
- m.C0 = weld.C0
- m.C1 = weld.C1
- local parent = weld.Parent
- weld:Destroy()
- m.Parent = parent
- Motor = m
- end
- function changeGrip()
- local player, char = getPlayerChar()
- while not char:FindFirstChild("Right Arm") do wait() end
- while not char["Right Arm"]:FindFirstChild("RightGrip") do wait() end
- convertWeldToMotor(char["Right Arm"].RightGrip)
- end
- function contains(t, v)
- for _, val in pairs(t) do
- if val == v then
- return true
- end
- end
- return false
- end
- function tagHuman(human)
- local player, char = getPlayerChar()
- local val = Instance.new("ObjectValue")
- val.Name = "creator"
- val.Value = player
- val.Parent = human
- game:GetService("Debris"):AddItem(val, 1)
- end
- function openAttackWindow()
- AttackHit = {}
- AttackDamaging = true
- delay(AttackWindow, function()
- AttackDamaging = false
- end)
- end
- function onTouched(part)
- if not AttackDamaging then return end
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- local pitch = math.random(60, 80)/100
- playSound("HitSound", pitch, 1)
- playSound("HitSound2", pitch + 0.3, 1)
- end
- end
- end
- function onTouchedSpecial(part)
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- end
- end
- end
- function special()
- local player, char = getPlayerChar()
- local root = char:FindFirstChild("Zombie")
- if root then
- openAttackWindow()
- local c = root.CFrame
- local dz = -8
- for t = 0, 1, 1/15 do
- delay(t, function()
- local pos = c:pointToWorldSpace(Vector3.new(0, -2.5, dz))
- local e = Instance.new("Explosion")
- e.BlastPressure = 0
- e.Position = pos
- e.Hit:connect(onTouchedSpecial)
- e.Parent = workspace
- dz = dz - 6
- end)
- end
- playSound("Explosion", 0.9, 1)
- end
- end
- function playSound(name, pitch, volume)
- local sound = Handle:FindFirstChild(name)
- if sound then
- sound.Pitch = pitch or math.random(90, 110)/100
- sound.Volume = volume or 0.5
- sound:Play()
- end
- end
- function attack()
- if not AttackAble then return end
- AttackAble = false
- delay(AttackRest, function()
- AttackAble = true
- end)
- local player, char = getPlayerChar()
- if AttackNumber < 5 then
- if AttackNumber == 1 or AttackNumber == 3 then
- Remote:FireClient(player, "PlayAnimation", "SwingRightToLeft")
- elseif AttackNumber == 2 or AttackNumber == 4 then
- Remote:FireClient(player, "PlayAnimation", "SwingLeftToRight")
- end
- openAttackWindow()
- playSound("SwingSound")
- else
- AttackNumber = 0
- end
- AttackNumber = AttackNumber + 1
- end
- function onRemote(callingPlayer, func, ...)
- local player, char = getPlayerChar()
- if callingPlayer == player then
- if func == "Attack" then
- attack()
- end
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --convert grip to a motor
- changeGrip()
- end
- function onUnequipped()
- if Motor then
- Motor:Destroy()
- end
- end
- --connect events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnServerEvent:connect(onRemote)
- Handle.Touched:connect(onTouched)
- end))
- Animation101.Name = "SwingRightToLeft"
- Animation101.Parent = Tool63
- Animation101.AnimationId = "http://www.roblox.com/asset/?id=184573779"
- Animation102.Name = "SwingLeftToRight"
- Animation102.Parent = Tool63
- Animation102.AnimationId = "http://www.roblox.com/asset/?id=184573748"
- Animation103.Name = "Slam"
- Animation103.Parent = Tool63
- Animation103.AnimationId = "http://www.roblox.com/asset/?id=184574340"
- Animation104.Name = "Hold"
- Animation104.Parent = Tool63
- Animation104.AnimationId = "http://www.roblox.com/asset/?id=184572142"
- Script105.Parent = Tool63
- table.insert(cors,sandbox(Script105,function()
- function LOL()
- script.Parent.Handle.AnimeMusic:Play()
- end
- function LOL2()
- script.Parent.Handle.AnimeMusic:Stop()
- end
- script.Parent.Equipped:connect(LOL)
- script.Parent.Unequipped:connect(LOL2)
- end))
- Model106.Name = "Resyncable"
- Model106.Parent = Tool63
- Shirt107.Name = "Shirt"
- Shirt107.Parent = Tool63
- Shirt107.ShirtTemplate = "http://www.roblox.com/asset/?id=41770216"
- Pants108.Name = "Pants"
- Pants108.Parent = Tool63
- Pants108.PantsTemplate = "http://www.roblox.com/asset/?id=45721839"
- BodyColors109.Parent = Tool63
- BodyColors109.HeadColor = BrickColor.new("Cyan")
- BodyColors109.LeftArmColor = BrickColor.new("Cyan")
- BodyColors109.LeftLegColor = BrickColor.new("Cyan")
- BodyColors109.RightArmColor = BrickColor.new("Cyan")
- BodyColors109.RightLegColor = BrickColor.new("Cyan")
- BodyColors109.TorsoColor = BrickColor.new("Cyan")
- Tool110.Name = "Candy_crazed"
- Tool110.Parent = mas
- Tool110.GripForward = Vector3.new(-0, 1, -0)
- Tool110.GripRight = Vector3.new(0, 0, 1)
- Tool110.GripUp = Vector3.new(-1, 0, 0)
- Tool110.ToolTip = "OOF"
- RemoteEvent111.Name = "Remote"
- RemoteEvent111.Parent = Tool110
- NumberValue112.Name = "Resistance"
- NumberValue112.Parent = Tool110
- NumberValue112.Value = 20
- Model113.Name = "Candy_Crazed"
- Model113.Parent = NumberValue112
- Part114.Name = "Head"
- Part114.Parent = Model113
- Part114.BrickColor = BrickColor.new("Institutional white")
- Part114.Rotation = Vector3.new(-180, -5, -180)
- Part114.FormFactor = Enum.FormFactor.Symmetric
- Part114.Size = Vector3.new(2, 1, 1)
- Part114.CFrame = CFrame.new(0.00438199984, 4.49999905, 0.100357004, -0.996194661, 0, -0.087155968, 0, 1, 0, 0.087155968, 0, -0.996194661)
- Part114.TopSurface = Enum.SurfaceType.Smooth
- Part114.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part114.Position = Vector3.new(0.00438199984, 4.49999905, 0.100357004)
- Part114.Orientation = Vector3.new(0, -175, 0)
- Part114.Color = Color3.new(0.972549, 0.972549, 0.972549)
- SpecialMesh115.Parent = Part114
- SpecialMesh115.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh115.Scale = Vector3.new(1.25, 1.25, 1.25)
- Attachment116.Name = "HatAttachment"
- Attachment116.Parent = Part114
- Attachment116.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment116.Position = Vector3.new(0, 0.600000024, 0)
- Attachment117.Name = "HairAttachment"
- Attachment117.Parent = Part114
- Attachment117.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment117.Position = Vector3.new(0, 0.600000024, 0)
- Attachment118.Name = "FaceFrontAttachment"
- Attachment118.Parent = Part114
- Attachment118.CFrame = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment118.Position = Vector3.new(0, 0, -0.600000024)
- Attachment119.Name = "FaceCenterAttachment"
- Attachment119.Parent = Part114
- Decal120.Name = "face"
- Decal120.Parent = Part114
- Decal120.Texture = "http://www.roblox.com/asset/?id=255828374"
- BillboardGui121.Parent = Part114
- BillboardGui121.Size = UDim2.new(0, 200, 0, 50)
- TextLabel122.Parent = BillboardGui121
- TextLabel122.Transparency = 1
- TextLabel122.Size = UDim2.new(0, 100, 0, 400)
- TextLabel122.Text = "Candy_Crazed"
- TextLabel122.Position = UDim2.new(0, 0, 0, -300)
- TextLabel122.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel122.BackgroundTransparency = 1
- TextLabel122.Font = Enum.Font.SourceSans
- TextLabel122.FontSize = Enum.FontSize.Size14
- TextLabel122.TextColor3 = Color3.new(0, 1, 1)
- TextLabel122.TextScaled = true
- TextLabel122.TextStrokeTransparency = 0
- TextLabel122.TextWrapped = true
- CharacterMesh123.Parent = Model113
- CharacterMesh123.MeshId = 27111882
- CharacterMesh123.BodyPart = Enum.BodyPart.RightLeg
- CharacterMesh124.Parent = Model113
- CharacterMesh124.MeshId = 27111857
- CharacterMesh124.BodyPart = Enum.BodyPart.LeftLeg
- Accessory125.Name = "Circuitboardlove"
- Accessory125.Parent = Model113
- Accessory125.AttachmentPos = Vector3.new(0, 1.37, -0.0500000007)
- Part126.Name = "Handle"
- Part126.Parent = Accessory125
- Part126.Rotation = Vector3.new(-180, -5, -180)
- Part126.CanCollide = false
- Part126.FormFactor = Enum.FormFactor.Symmetric
- Part126.Size = Vector3.new(1, 1, 2)
- Part126.CFrame = CFrame.new(0, 3.62999892, 0.0502719991, -0.996194661, 0, -0.087155968, 0, 1, 0, 0.087155968, 0, -0.996194661)
- Part126.BottomSurface = Enum.SurfaceType.Smooth
- Part126.TopSurface = Enum.SurfaceType.Smooth
- Part126.Position = Vector3.new(0, 3.62999892, 0.0502719991)
- Part126.Orientation = Vector3.new(0, -175, 0)
- SpecialMesh127.Parent = Part126
- SpecialMesh127.MeshId = "http://www.roblox.com/asset/?id=48494467"
- SpecialMesh127.Scale = Vector3.new(1.10000002, 1, 1)
- SpecialMesh127.TextureId = "http://www.roblox.com/asset/?id=48494437"
- SpecialMesh127.MeshType = Enum.MeshType.FileMesh
- SpecialMesh127.Scale = Vector3.new(1.10000002, 1, 1)
- Attachment128.Name = "NeckAttachment"
- Attachment128.Parent = Part126
- Attachment128.Rotation = Vector3.new(0, 0, 3.91582454e-29)
- Attachment128.CFrame = CFrame.new(5.96046448e-08, 0.369999647, -0.0502723642, 1, -6.83440315e-31, 0, 6.83440315e-31, 1, -0, 0, 0, 1)
- Attachment128.Position = Vector3.new(5.96046448e-08, 0.369999647, -0.0502723642)
- Attachment128.Axis = Vector3.new(1, 6.83440315e-31, 0)
- Attachment128.Orientation = Vector3.new(0, 0, 3.91582454e-29)
- CharacterMesh129.Parent = Model113
- CharacterMesh129.MeshId = 27111894
- CharacterMesh129.BodyPart = Enum.BodyPart.Torso
- Pants130.Name = "Pants"
- Pants130.Parent = Model113
- Pants130.PantsTemplate = "http://www.roblox.com/asset/?id=802554696"
- Accessory131.Name = "Nerd Glasses"
- Accessory131.Parent = Model113
- Accessory131.AttachmentPos = Vector3.new(0, 0.300000012, 0.25)
- Part132.Name = "Handle"
- Part132.Parent = Accessory131
- Part132.Rotation = Vector3.new(-180, -5, -180)
- Part132.CanCollide = false
- Part132.FormFactor = Enum.FormFactor.Plate
- Part132.Size = Vector3.new(1, 0.400000006, 1)
- Part132.CFrame = CFrame.new(0.0261470005, 4.69999886, 0.349135011, -0.996194661, 0, -0.087155968, 0, 1, 0, 0.087155968, 0, -0.996194661)
- Part132.BottomSurface = Enum.SurfaceType.Smooth
- Part132.TopSurface = Enum.SurfaceType.Smooth
- Part132.Position = Vector3.new(0.0261470005, 4.69999886, 0.349135011)
- Part132.Orientation = Vector3.new(0, -175, 0)
- SpecialMesh133.Parent = Part132
- SpecialMesh133.MeshId = "http://www.roblox.com/asset/?id=11419729"
- SpecialMesh133.TextureId = "http://www.roblox.com/asset/?id=112346956"
- SpecialMesh133.MeshType = Enum.MeshType.FileMesh
- Attachment134.Name = "FaceFrontAttachment"
- Attachment134.Parent = Part132
- Attachment134.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment134.CFrame = CFrame.new(3.93538357e-09, -0.199999809, -0.350272298, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment134.Position = Vector3.new(3.93538357e-09, -0.199999809, -0.350272298)
- Attachment134.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment134.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value135.Name = "OriginalSize"
- Vector3Value135.Parent = Part132
- Vector3Value135.Value = Vector3.new(1, 0.400000006, 1)
- Accessory136.Name = "moreanimeboyhair"
- Accessory136.Parent = Model113
- Accessory136.AttachmentPos = Vector3.new(0, 0.340000004, 0.25)
- Part137.Name = "Handle"
- Part137.Parent = Accessory136
- Part137.Rotation = Vector3.new(-180, -5, -180)
- Part137.CanCollide = false
- Part137.FormFactor = Enum.FormFactor.Custom
- Part137.Size = Vector3.new(1.60002756, 0.800000012, 1.59999776)
- Part137.CFrame = CFrame.new(-0.0523979999, 4.59999895, 0.0250199996, -0.996194661, 0, -0.087155968, 0, 1, 0, 0.087155968, 0, -0.996194661)
- Part137.BottomSurface = Enum.SurfaceType.Smooth
- Part137.TopSurface = Enum.SurfaceType.Smooth
- Part137.Position = Vector3.new(-0.0523979999, 4.59999895, 0.0250199996)
- Part137.Orientation = Vector3.new(0, -175, 0)
- SpecialMesh138.Parent = Part137
- SpecialMesh138.MeshId = "rbxassetid://913578626"
- SpecialMesh138.Scale = Vector3.new(0.899999976, 0.899999976, 0.949999988)
- SpecialMesh138.TextureId = "rbxassetid://913581010"
- SpecialMesh138.MeshType = Enum.MeshType.FileMesh
- SpecialMesh138.Scale = Vector3.new(0.899999976, 0.899999976, 0.949999988)
- Attachment139.Name = "HairAttachment"
- Attachment139.Parent = Part137
- Attachment139.Rotation = Vector3.new(2.37458114e-14, 1.73605135e-13, -4.50996595e-07)
- Attachment139.CFrame = CFrame.new(-0.0500000007, 0.5, -0.0799999982, 1, 7.87137555e-09, 3.02998127e-15, -7.87137555e-09, 1, -4.1444258e-16, -3.02998127e-15, 4.14442554e-16, 1)
- Attachment139.Position = Vector3.new(-0.0500000007, 0.5, -0.0799999982)
- Attachment139.Axis = Vector3.new(1, -7.87137555e-09, -3.02998127e-15)
- Attachment139.Orientation = Vector3.new(2.37458114e-14, 1.73605135e-13, -4.50996595e-07)
- Vector3Value140.Name = "OriginalSize"
- Vector3Value140.Parent = Part137
- Vector3Value140.Value = Vector3.new(1.60002756, 0.800000012, 1.59999776)
- Accessory141.Name = "BearMask"
- Accessory141.Parent = Model113
- Accessory141.AttachmentPos = Vector3.new(0, 0.730000019, 0.0199999996)
- Part142.Name = "Handle"
- Part142.Parent = Accessory141
- Part142.Rotation = Vector3.new(-180, -5, -180)
- Part142.CanCollide = false
- Part142.FormFactor = Enum.FormFactor.Custom
- Part142.Size = Vector3.new(1.19999909, 0.599999845, 1.20000005)
- Part142.CFrame = CFrame.new(0.00699699996, 4.26999903, 0.130244002, -0.996194661, 0, -0.087155968, 0, 1, 0, 0.087155968, 0, -0.996194661)
- Part142.BottomSurface = Enum.SurfaceType.Smooth
- Part142.TopSurface = Enum.SurfaceType.Smooth
- Part142.Position = Vector3.new(0.00699699996, 4.26999903, 0.130244002)
- Part142.Orientation = Vector3.new(0, -175, 0)
- SpecialMesh143.Parent = Part142
- SpecialMesh143.MeshId = "rbxassetid://1192459566"
- SpecialMesh143.Scale = Vector3.new(2, 2, 2)
- SpecialMesh143.TextureId = "rbxassetid://1192457668"
- SpecialMesh143.MeshType = Enum.MeshType.FileMesh
- SpecialMesh143.Scale = Vector3.new(2, 2, 2)
- Attachment144.Name = "FaceFrontAttachment"
- Attachment144.Parent = Part142
- Attachment144.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment144.CFrame = CFrame.new(0, 0.230000004, -0.569999993, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment144.Position = Vector3.new(0, 0.230000004, -0.569999993)
- Attachment144.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment144.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value145.Name = "OriginalSize"
- Vector3Value145.Parent = Part142
- Vector3Value145.Value = Vector3.new(1.19999909, 0.599999845, 1.20000005)
- CharacterMesh146.Parent = Model113
- CharacterMesh146.MeshId = 27111419
- CharacterMesh146.BodyPart = Enum.BodyPart.LeftArm
- CharacterMesh147.Name = "Roblox 2.0 Right Arm"
- CharacterMesh147.Parent = Model113
- CharacterMesh147.MeshId = 27111864
- CharacterMesh147.BodyPart = Enum.BodyPart.RightArm
- Shirt148.Name = "Shirt"
- Shirt148.Parent = Model113
- Shirt148.ShirtTemplate = "http://www.roblox.com/asset/?id=772844447"
- BodyColors149.Parent = Model113
- BodyColors149.HeadColor = BrickColor.new("Institutional white")
- BodyColors149.LeftArmColor = BrickColor.new("Institutional white")
- BodyColors149.LeftLegColor = BrickColor.new("White")
- BodyColors149.RightArmColor = BrickColor.new("Institutional white")
- BodyColors149.RightLegColor = BrickColor.new("White")
- BodyColors149.TorsoColor = BrickColor.new("Institutional white")
- Script150.Name = "qPerfectionWeld"
- Script150.Parent = Tool110
- table.insert(cors,sandbox(Script150,function()
- -- Created by Quenty (@Quenty, follow me on twitter).
- -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
- -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
- --[[ INSTRUCTIONS
- - Place in the model
- - Make sure model is anchored
- - That's it. It will weld the model and all children.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- 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.
- ]]
- --[[ DOCUMENTATION
- - 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.
- - Will work in PBS servers
- - Will work as long as it starts out with the part anchored
- - Stores the relative CFrame as a CFrame value
- - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
- - Utilizes a recursive algorith to find all parts in the model
- - Will reweld on script reparent if the script is initially parented to a tool.
- - Welds as fast as possible
- ]]
- -- qPerfectionWeld.lua
- -- Created 10/6/2014
- -- Author: Quenty
- -- Version 1.0.3
- -- Updated 10/14/2014 - Updated to 1.0.1
- --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
- -- Updated 10/14/2014 - Updated to 1.0.2
- --- Fixed bug fix.
- -- Updated 10/14/2014 - Updated to 1.0.3
- --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
- 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).
- local function CallOnChildren(Instance, FunctionToCall)
- -- Calls a function on each of the children of a certain object, using recursion.
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- CallOnChildren(Child, FunctionToCall)
- end
- end
- local function GetNearestParent(Instance, ClassName)
- -- Returns the nearest parent of a certain class, or returns nil
- local Ancestor = Instance
- repeat
- Ancestor = Ancestor.Parent
- if Ancestor == nil then
- return nil
- end
- until Ancestor:IsA(ClassName)
- return Ancestor
- end
- local function GetBricks(StartInstance)
- local List = {}
- -- if StartInstance:IsA("BasePart") then
- -- List[#List+1] = StartInstance
- -- end
- CallOnChildren(StartInstance, function(Item)
- if Item:IsA("BasePart") then
- List[#List+1] = Item;
- end
- end)
- return List
- end
- local function Modify(Instance, Values)
- -- Modifies an Instance by using a table.
- assert(type(Values) == "table", "Values is not a table");
- for Index, Value in next, Values do
- if type(Index) == "number" then
- Value.Parent = Instance
- else
- Instance[Index] = Value
- end
- end
- return Instance
- end
- local function Make(ClassType, Properties)
- -- Using a syntax hack to create a nice way to Make new items.
- return Modify(Instance.new(ClassType), Properties)
- end
- local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
- local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
- local function HasWheelJoint(Part)
- for _, SurfaceName in pairs(Surfaces) do
- for _, HingSurfaceName in pairs(HingSurfaces) do
- if Part[SurfaceName].Name == HingSurfaceName then
- return true
- end
- end
- end
- return false
- end
- local function ShouldBreakJoints(Part)
- --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
- -- definitely some edge cases.
- if NEVER_BREAK_JOINTS then
- return false
- end
- if HasWheelJoint(Part) then
- return false
- end
- local Connected = Part:GetConnectedParts()
- if #Connected == 1 then
- return false
- end
- for _, Item in pairs(Connected) do
- if HasWheelJoint(Item) then
- return false
- elseif not Item:IsDescendantOf(script.Parent) then
- return false
- end
- end
- return true
- end
- local function WeldTogether(Part0, Part1, JointType, WeldParent)
- --- Weld's 2 parts together
- -- @param Part0 The first part
- -- @param Part1 The second part (Dependent part most of the time).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
- -- @return The weld created.
- JointType = JointType or "Weld"
- local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
- local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
- Modify(NewWeld, {
- Name = "qCFrameWeldThingy";
- Part0 = Part0;
- Part1 = Part1;
- C0 = CFrame.new();--Part0.CFrame:inverse();
- C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
- Parent = Part1;
- })
- if not RelativeValue then
- RelativeValue = Make("CFrameValue", {
- Parent = Part1;
- Name = "qRelativeCFrameWeldValue";
- Archivable = true;
- Value = NewWeld.C1;
- })
- end
- return NewWeld
- end
- local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
- -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
- -- @param MainPart The part to weld the model to (can be in the model).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
- for _, Part in pairs(Parts) do
- if ShouldBreakJoints(Part) then
- Part:BreakJoints()
- end
- end
- for _, Part in pairs(Parts) do
- if Part ~= MainPart then
- WeldTogether(MainPart, Part, JointType, MainPart)
- end
- end
- if not DoNotUnanchor then
- for _, Part in pairs(Parts) do
- Part.Anchored = false
- end
- MainPart.Anchored = false
- end
- end
- local function PerfectionWeld()
- local Tool = GetNearestParent(script, "Tool")
- local Parts = GetBricks(script.Parent)
- 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]
- if PrimaryPart then
- WeldParts(Parts, PrimaryPart, "Weld", false)
- else
- warn("qWeld - Unable to weld part")
- end
- return Tool
- end
- local Tool = PerfectionWeld()
- if Tool and script.ClassName == "Script" then
- --- Don't bother with local scripts
- script.Parent.AncestryChanged:connect(function()
- PerfectionWeld()
- end)
- end
- -- Created by Quenty (@Quenty, follow me on twitter).
- end))
- Part151.Name = "Handle"
- Part151.Parent = Tool110
- Part151.Material = Enum.Material.Metal
- Part151.BrickColor = BrickColor.new("Toothpaste")
- Part151.Transparency = 1
- Part151.Rotation = Vector3.new(0, -87.7399979, -90)
- Part151.Anchored = true
- Part151.CanCollide = false
- Part151.FormFactor = Enum.FormFactor.Custom
- Part151.Size = Vector3.new(0.200000003, 0.573924482, 1)
- Part151.CFrame = CFrame.new(0.0249101222, 4.33820772, 0.185504228, 0, 0.0394580103, -0.999221265, -1, 0, 0, 0, 0.999221265, 0.0394580103)
- Part151.Color = Color3.new(0, 1, 1)
- Part151.Position = Vector3.new(0.0249101222, 4.33820772, 0.185504228)
- Part151.Orientation = Vector3.new(0, -87.7399979, -90)
- Part151.Color = Color3.new(0, 1, 1)
- Sound152.Name = "AnimeMusic"
- Sound152.Parent = Part151
- Sound152.SoundId = "rbxassetid://943961217"
- Sound152.Volume = 10
- Sound152.Looped = true
- LocalScript153.Name = "Client"
- LocalScript153.Parent = Tool110
- table.insert(cors,sandbox(LocalScript153,function()
- local Player = game:GetService("Players").LocalPlayer
- while not Player.Character do wait() end
- local Character = Player.Character
- local Human = Character:WaitForChild("Humanoid")
- local CAS = game:GetService("ContextActionService")
- local ActionName = "GiantAngelicSword"
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Animations = {
- Hold = Tool:WaitForChild("Hold"),
- Slam = Tool:WaitForChild("Slam"),
- SwingRightToLeft = Tool:WaitForChild("SwingRightToLeft"),
- SwingLeftToRight = Tool:WaitForChild("SwingLeftToRight"),
- }
- local HoldTrack
- function playAnimation(name, fade, weight, speed)
- if Animations[name] then
- local track = Human:LoadAnimation(Animations[name])
- track:Play(fade, weight, speed)
- end
- end
- function onAction(actionName, inputState, inputObject)
- if inputState == Enum.UserInputState.Begin then
- Remote:FireServer("Attack")
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --animate
- HoldTrack = Human:LoadAnimation(Animations.Hold)
- HoldTrack:Play(0.5)
- --bind actions
- CAS:BindActionToInputTypes(
- ActionName,
- onAction,
- false,
- Enum.UserInputType.MouseButton1,
- Enum.UserInputType.Touch
- )
- end
- function onUnequipped()
- --unbind
- CAS:UnbindAction(ActionName)
- --stop animation
- if HoldTrack then
- HoldTrack:Stop()
- end
- end
- function onRemote(func, ...)
- if func == "PlayAnimation" then
- playAnimation(...)
- end
- end
- --set up events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnClientEvent:connect(onRemote)
- end))
- Script154.Name = "Server"
- Script154.Parent = Tool110
- table.insert(cors,sandbox(Script154,function()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Handle = Tool:WaitForChild("Handle")
- local Motor
- local AttackNumber = 1
- local AttackDamage = 50
- local AttackWindow = 0.6
- local AttackRest = 0
- local AttackAble = true
- local AttackDamaging = true
- local AttackHit = {}
- function getPlayerChar()
- local char = Tool.Parent
- local player = game:GetService("Players"):GetPlayerFromCharacter(char)
- return player, char
- end
- function convertWeldToMotor(weld)
- local m = Instance.new("Motor6D")
- m.Name = weld.Name
- m.Part0 = weld.Part0
- m.Part1 = weld.Part1
- m.C0 = weld.C0
- m.C1 = weld.C1
- local parent = weld.Parent
- weld:Destroy()
- m.Parent = parent
- Motor = m
- end
- function changeGrip()
- local player, char = getPlayerChar()
- while not char:FindFirstChild("Right Arm") do wait() end
- while not char["Right Arm"]:FindFirstChild("RightGrip") do wait() end
- convertWeldToMotor(char["Right Arm"].RightGrip)
- end
- function contains(t, v)
- for _, val in pairs(t) do
- if val == v then
- return true
- end
- end
- return false
- end
- function tagHuman(human)
- local player, char = getPlayerChar()
- local val = Instance.new("ObjectValue")
- val.Name = "creator"
- val.Value = player
- val.Parent = human
- game:GetService("Debris"):AddItem(val, 1)
- end
- function openAttackWindow()
- AttackHit = {}
- AttackDamaging = true
- delay(AttackWindow, function()
- AttackDamaging = false
- end)
- end
- function onTouched(part)
- if not AttackDamaging then return end
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- local pitch = math.random(60, 80)/100
- playSound("HitSound", pitch, 1)
- playSound("HitSound2", pitch + 0.3, 1)
- end
- end
- end
- function onTouchedSpecial(part)
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- end
- end
- end
- function special()
- local player, char = getPlayerChar()
- local root = char:FindFirstChild("Zombie")
- if root then
- openAttackWindow()
- local c = root.CFrame
- local dz = -8
- for t = 0, 1, 1/15 do
- delay(t, function()
- local pos = c:pointToWorldSpace(Vector3.new(0, -2.5, dz))
- local e = Instance.new("Explosion")
- e.BlastPressure = 0
- e.Position = pos
- e.Hit:connect(onTouchedSpecial)
- e.Parent = workspace
- dz = dz - 6
- end)
- end
- playSound("Explosion", 0.9, 1)
- end
- end
- function playSound(name, pitch, volume)
- local sound = Handle:FindFirstChild(name)
- if sound then
- sound.Pitch = pitch or math.random(90, 110)/100
- sound.Volume = volume or 0.5
- sound:Play()
- end
- end
- function attack()
- if not AttackAble then return end
- AttackAble = false
- delay(AttackRest, function()
- AttackAble = true
- end)
- local player, char = getPlayerChar()
- if AttackNumber < 5 then
- if AttackNumber == 1 or AttackNumber == 3 then
- Remote:FireClient(player, "PlayAnimation", "SwingRightToLeft")
- elseif AttackNumber == 2 or AttackNumber == 4 then
- Remote:FireClient(player, "PlayAnimation", "SwingLeftToRight")
- end
- openAttackWindow()
- playSound("SwingSound")
- else
- AttackNumber = 0
- end
- AttackNumber = AttackNumber + 1
- end
- function onRemote(callingPlayer, func, ...)
- local player, char = getPlayerChar()
- if callingPlayer == player then
- if func == "Attack" then
- attack()
- end
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --convert grip to a motor
- changeGrip()
- end
- function onUnequipped()
- if Motor then
- Motor:Destroy()
- end
- end
- --connect events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnServerEvent:connect(onRemote)
- Handle.Touched:connect(onTouched)
- end))
- Animation155.Name = "SwingRightToLeft"
- Animation155.Parent = Tool110
- Animation155.AnimationId = "http://www.roblox.com/asset/?id=184573779"
- Animation156.Name = "SwingLeftToRight"
- Animation156.Parent = Tool110
- Animation156.AnimationId = "http://www.roblox.com/asset/?id=184573748"
- Animation157.Name = "Slam"
- Animation157.Parent = Tool110
- Animation157.AnimationId = "http://www.roblox.com/asset/?id=184574340"
- Animation158.Name = "Hold"
- Animation158.Parent = Tool110
- Animation158.AnimationId = "http://www.roblox.com/asset/?id=184572142"
- Script159.Parent = Tool110
- table.insert(cors,sandbox(Script159,function()
- function LOL()
- script.Parent.Handle.AnimeMusic:Play()
- end
- function LOL2()
- script.Parent.Handle.AnimeMusic:Stop()
- end
- script.Parent.Equipped:connect(LOL)
- script.Parent.Unequipped:connect(LOL2)
- end))
- Model160.Name = "Resyncable"
- Model160.Parent = Tool110
- Shirt161.Name = "Shirt"
- Shirt161.Parent = Tool110
- Shirt161.ShirtTemplate = "http://www.roblox.com/asset/?id=41770216"
- Pants162.Name = "Pants"
- Pants162.Parent = Tool110
- Pants162.PantsTemplate = "http://www.roblox.com/asset/?id=45721839"
- BodyColors163.Parent = Tool110
- BodyColors163.HeadColor = BrickColor.new("Cyan")
- BodyColors163.LeftArmColor = BrickColor.new("Cyan")
- BodyColors163.LeftLegColor = BrickColor.new("Cyan")
- BodyColors163.RightArmColor = BrickColor.new("Cyan")
- BodyColors163.RightLegColor = BrickColor.new("Cyan")
- BodyColors163.TorsoColor = BrickColor.new("Cyan")
- Tool164.Name = "DON'T PUT ME INTO A WASHING MACHINE OR I'LL PLAY THIS MUSIC"
- Tool164.Parent = mas
- Tool164.GripForward = Vector3.new(-0.293416232, 0.421587229, -0.858004153)
- Tool164.GripPos = Vector3.new(0, 0, -1.70000005)
- Tool164.GripRight = Vector3.new(-0.736731231, -0.671662271, -0.0780827701)
- Tool164.GripUp = Vector3.new(0.609207749, -0.609207749, -0.507673085)
- Tool164.ToolTip = "OR I'LL PLAY THIS MUSIC"
- Part165.Name = "Handle"
- Part165.Parent = Tool164
- Part165.BrickColor = BrickColor.new("Really black")
- Part165.Rotation = Vector3.new(-180, 0, -180)
- Part165.FormFactor = Enum.FormFactor.Custom
- Part165.Size = Vector3.new(0.400000006, 3, 0.800000012)
- Part165.CFrame = CFrame.new(-260.47998, 1.500018, -324.950012, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part165.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part165.Position = Vector3.new(-260.47998, 1.500018, -324.950012)
- Part165.Orientation = Vector3.new(0, 180, 0)
- Part165.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Sound166.Name = "AnimeMusic"
- Sound166.Parent = Part165
- Sound166.SoundId = "rbxassetid://1343510795"
- Sound166.Volume = 3
- Sound166.Looped = true
- SpecialMesh167.Parent = Part165
- SpecialMesh167.MeshId = "http://www.roblox.com/asset/?id=43996479"
- SpecialMesh167.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
- SpecialMesh167.TextureId = "http://www.roblox.com/asset/?id=43997070"
- SpecialMesh167.MeshType = Enum.MeshType.FileMesh
- SpecialMesh167.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
- Script168.Parent = Tool164
- table.insert(cors,sandbox(Script168,function()
- function LOL()
- script.Parent.Handle.AnimeMusic:Play()
- end
- function LOL2()
- script.Parent.Handle.AnimeMusic:Stop()
- end
- script.Parent.Equipped:connect(LOL)
- script.Parent.Unequipped:connect(LOL2)
- end))
- Tool169.Name = "OmegaNotSoRainbowSword"
- Tool169.Parent = mas
- Tool169.GripPos = Vector3.new(0, -2.3499999, 0.25)
- Part170.Name = "Handle"
- Part170.Parent = Tool169
- Part170.Rotation = Vector3.new(-46.1899986, -10.7299995, -10.9899998)
- Part170.Locked = true
- Part170.FormFactor = Enum.FormFactor.Custom
- Part170.Size = Vector3.new(0.200000003, 6, 0.75)
- Part170.CFrame = CFrame.new(-257.046204, 2.38130212, -328.856171, 0.964508057, 0.187234089, -0.186193511, 9.16905947e-07, 0.705131471, 0.70907706, 0.264054179, -0.683909833, 0.680104733)
- Part170.BottomSurface = Enum.SurfaceType.Smooth
- Part170.TopSurface = Enum.SurfaceType.Smooth
- Part170.Position = Vector3.new(-257.046204, 2.38130212, -328.856171)
- Part170.Orientation = Vector3.new(-45.1599998, -15.3099995, 0)
- SpecialMesh171.Parent = Part170
- SpecialMesh171.MeshId = "http://www.roblox.com/asset/?id=283709615"
- SpecialMesh171.Scale = Vector3.new(0.5, 0.5, 0.5)
- SpecialMesh171.TextureId = "http://www.roblox.com/asset/?id=283709681"
- SpecialMesh171.MeshType = Enum.MeshType.FileMesh
- SpecialMesh171.Scale = Vector3.new(0.5, 0.5, 0.5)
- Sound172.Name = "Unsheath"
- Sound172.Parent = Part170
- Sound172.SoundId = "http://www.roblox.com/asset/?id=12222225"
- Sound172.Volume = 1
- Sound173.Name = "Slash"
- Sound173.Parent = Part170
- Sound173.SoundId = "http://www.roblox.com/asset/?id=12222216"
- Sound173.Volume = 1
- Sound174.Name = "Lunge"
- Sound174.Parent = Part170
- Sound174.SoundId = "http://www.roblox.com/asset/?id=12222208"
- Sound174.Volume = 1
- Sound175.Name = "AnimeMusic"
- Sound175.Parent = Part170
- Sound175.Pitch = 1.2000000476837
- Sound175.SoundId = "rbxassetid://271550300"
- Sound175.Volume = 10
- Sound175.Looped = true
- Script176.Parent = Tool169
- table.insert(cors,sandbox(Script176,function()
- --Made by Luckymaxer
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Players = game:GetService("Players")
- Debris = game:GetService("Debris")
- RunService = game:GetService("RunService")
- RemoverScript = script:WaitForChild("RemoverScript")
- ParticleScript = script:WaitForChild("ParticleScript")
- ParticleFire = script:WaitForChild("Fire")
- RbxUtility = LoadLibrary("RbxUtility")
- Create = RbxUtility.Create
- BaseUrl = "http://www.roblox.com/asset/?id="
- Gravity = 196.20
- Rate = (1 / 60)
- Damage = {
- Touch = {Min = 0, Max = 0},
- Hit = {Min = 0, Max = 0},
- }
- FireDamage = 0
- BasePart = Create("Part"){
- Material = Enum.Material.Plastic,
- Shape = Enum.PartType.Block,
- TopSurface = Enum.SurfaceType.Smooth,
- BottomSurface = Enum.SurfaceType.Smooth,
- FormFactor = Enum.FormFactor.Custom,
- Size = Vector3.new(0.2, 0.2, 0.2),
- CanCollide = true,
- Locked = true,
- }
- Grips = {
- Up = CFrame.new(0, -2.35, 0.25, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- Out = CFrame.new(0, -2.35, 0.25, 1, 0, 0, 0, 0, -1, -0, 1, 0),
- }
- Animations = {
- LeftSlash = {Animation = Tool:WaitForChild("LeftSlash"), FadeTime = nil, Weight = nil, Speed = 2.5, Duration = 0.5},
- RightSlash = {Animation = Tool:WaitForChild("RightSlash"), FadeTime = nil, Weight = nil, Speed = 2.5, Duration = 0.5},
- Lunge = {Animation = Tool:WaitForChild("Lunge"), FadeTime = 0, Weight = nil, Speed = nil, Duration = nil},
- }
- Sounds = {
- Unsheath = Handle:WaitForChild("Unsheath"),
- Slash = Handle:WaitForChild("Slash"),
- Lunge = Handle:WaitForChild("Lunge"),
- }
- LastAttack = 0
- Special = {
- Enabled = true,
- Active = false,
- ReloadTime = 20,
- }
- Particles = {}
- Lunging = false
- ToolEquipped = false
- ServerControl = (Tool:FindFirstChild("ServerControl") or Create("RemoteFunction"){
- Name = "ServerControl",
- Parent = Tool,
- })
- ClientControl = (Tool:FindFirstChild("ClientControl") or Create("RemoteFunction"){
- Name = "ClientControl",
- Parent = Tool,
- })
- Handle.Transparency = 0
- Tool.Enabled = true
- function IsTeamMate(Player1, Player2)
- return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
- end
- function TagHumanoid(humanoid, player)
- local Creator_Tag = Create("ObjectValue"){
- Name = "creator",
- Value = player,
- }
- Debris:AddItem(Creator_Tag, 2)
- Creator_Tag.Parent = humanoid
- end
- function UntagHumanoid(humanoid)
- for i, v in pairs(humanoid:GetChildren()) do
- if v:IsA("ObjectValue") and v.Name == "creator" then
- v:Destroy()
- end
- end
- end
- function Swing(PossibleAnims)
- if not CheckIfAlive() or not ToolEquipped then
- return
- end
- if PossibleAnims and #PossibleAnims > 0 then
- local Animation = PossibleAnims[math.random(1, #PossibleAnims)]
- CurrentAnimation = Animation
- local AttackAnimation = CurrentAnimation
- Spawn(function()
- InvokeClient("PlayAnimation", CurrentAnimation)
- end)
- Delay(Animation.Duration, (function()
- CurrentAnimation = nil
- end))
- end
- end
- function CheckTableForString(Table, String)
- for i, v in pairs(Table) do
- if string.lower(v) == string.lower(String) then
- return true
- end
- end
- return false
- end
- function Blow(Hit)
- if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
- return
- end
- local RightArm = Character:FindFirstChild("Right Arm")
- if not RightArm then
- return
- end
- local RightGrip = RightArm:FindFirstChild("RightGrip")
- if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
- return
- end
- local character = Hit.Parent
- if character == Character then
- return
- end
- local humanoid = character:FindFirstChild("Humanoid")
- if not humanoid or humanoid.Health == 0 then
- return
- end
- local player = Players:GetPlayerFromCharacter(character)
- if player and (player == Player or IsTeamMate(Player, player)) then
- return
- end
- local PossibleDamage = ((CurrentAnimation and Damage.Hit) or Damage.Touch)
- local DamageValue = math.random(PossibleDamage.Min, PossibleDamage.Max)
- local HealthAfter = (humanoid.Health - DamageValue)
- UntagHumanoid(humanoid)
- TagHumanoid(humanoid, Player)
- humanoid:TakeDamage(DamageValue)
- if HealthAfter > 0 then
- end
- end
- function GetAllConnectedParts(Object)
- local Parts = {}
- local function GetConnectedParts(Object)
- for i, v in pairs(Object:GetConnectedParts()) do
- local Ignore = false
- for ii, vv in pairs(Parts) do
- if v == vv then
- Ignore = true
- end
- end
- if not Ignore then
- table.insert(Parts, v)
- GetConnectedParts(v)
- end
- end
- end
- GetConnectedParts(Object)
- return Parts
- end
- function Lunge(MousePosition)
- Lunging = true
- for i, v in pairs(Animations) do
- Spawn(function()
- InvokeClient("StopAnimation", v)
- end)
- end
- Sounds.Lunge:Play()
- Tool.Grip = Grips.Out
- local Direction = CFrame.new(Torso.Position, Vector3.new(MousePosition.X, Torso.Position.Y, MousePosition.Z))
- Torso.CFrame = Direction
- local Parts = GetAllConnectedParts(Torso)
- local Mass = 0
- for i, v in pairs(Parts) do
- Mass = (Mass + v:GetMass())
- end
- Mass = (Mass * Gravity * 100)
- local BodyVelocity = Create("BodyVelocity"){
- maxForce = Vector3.new(Mass, 0, Mass),
- velocity = (Direction.lookVector * 100),
- }
- local BodyGyro = Create("BodyGyro"){
- maxTorque = Vector3.new(math.huge, math.huge, math.huge),
- cframe = Direction,
- }
- for i, v in pairs({BodyVelocity, BodyGyro}) do
- Debris:AddItem(v, 0.5)
- v.Parent = Torso
- end
- wait(0.75)
- Tool.Grip = Grips.Up
- wait(0.5)
- Lunging = false
- end
- function TweenColor(Object, Property, CurrentColor, DesiredColor, Time)
- local Difference = {
- Red = (DesiredColor.r - CurrentColor.r),
- Green = (DesiredColor.g - CurrentColor.g),
- Blue = (DesiredColor.b - CurrentColor.b),
- }
- local ChangeRate = 30
- for i = 1, (Time * ChangeRate) do
- local NewColor = Color3.new(
- (CurrentColor.r + Difference.Red / (Time * ChangeRate)),
- (CurrentColor.g + Difference.Green / (Time * ChangeRate)),
- (CurrentColor.b + Difference.Blue / (Time * ChangeRate))
- )
- CurrentColor = NewColor
- pcall(function()
- Object[Property] = NewColor
- end)
- wait(Rate)
- end
- end
- function ParticleHit(Part)
- local HitDebounce = false
- local TouchedConnection
- TouchedConnection = Part.Touched:connect(function(Hit)
- if not Hit or not Hit.Parent or HitDebounce then
- return
- end
- local character = Hit.Parent
- local humanoid = character:FindFirstChild("Humanoid")
- if not humanoid or humanoid.Health == 0 then
- return
- end
- local player = Players:GetPlayerFromCharacter(character)
- if player and (player == Player or IsTeamMate(Player, player)) then
- return
- end
- if not Special.Active then
- HitDebounce = true
- end
- UntagHumanoid(humanoid)
- TagHumanoid(humanoid, Player)
- humanoid:TakeDamage(FireDamage * ((Special.Active and 2.5) or 1))
- local Fire = Part:FindFirstChild("Fire")
- if Fire then
- for i, v in pairs(character:GetChildren()) do
- if v:IsA("BasePart") and not v:FindFirstChild("EffectFire") then
- local FireCopy = ParticleFire:Clone()
- FireCopy.Name = "EffectFire"
- FireCopy.Color = ColorSequence.new(Fire.Color, Fire.Color)
- FireCopy.Enabled = true
- local ParticleScriptCopy = ParticleScript:Clone()
- local Duration = Create("NumberValue"){
- Name = "Duration",
- Value = 4,
- Parent = FireCopy,
- }
- ParticleScriptCopy.Disabled = false
- ParticleScriptCopy.Parent = FireCopy
- Debris:AddItem(FireCopy, 5)
- FireCopy.Parent = v
- end
- end
- end
- wait(0.5)
- HitDebounce = false
- end)
- return
- end
- function CreateParticles()
- Particles = {}
- local ModelName = (Player.Name .. "'s Particles")
- local ParticleRadius = 5
- local ParticleModel = Create("Model"){
- Name = ModelName,
- }
- local Values = {
- {Name = "Creator", Class = "ObjectValue", Value = Player},
- {Name = "Tool", Class = "ObjectValue", Value = Tool},
- }
- local RemoverScriptCopy = RemoverScript:Clone()
- for i, v in pairs(Values) do
- local Value = Create(v.Class){
- Name = v.Name,
- Value = v.Value,
- Parent = RemoverScriptCopy,
- }
- end
- RemoverScriptCopy.Disabled = false
- RemoverScriptCopy.Parent = ParticleModel
- local OrbitingVelocity = 15
- local Radius = 7.5
- local RadiusSquared = (Radius ^ 2)
- local OrbitingVelocitySquared = (OrbitingVelocity ^ 2)
- local Count = 40
- local Colors = {"Really red", "Really blue", "Deep orange"}
- local Now = tick()
- for i = 1, Count do
- local ParticlePart = BasePart:Clone()
- ParticlePart.Name = "Effect"
- ParticlePart.Transparency = 1
- ParticlePart.Size = Vector3.new(1, 1, 1)
- ParticlePart.CanCollide = false
- local FireColor = BrickColor.new(Colors[math.random(1, #Colors)]).Color
- local Fire = Create("Fire"){
- Color = FireColor,
- SecondaryColor = FireColor,
- Heat = 2,
- Size = 3,
- Enabled = true,
- Parent = ParticlePart,
- }
- local Mass = ParticlePart:GetMass()
- local SpawnPos = Torso.Position
- local OrbitingVelocity = 15
- local Theta = (i / 20 * 2 * math.pi)
- local NewVelocity = Vector3.new((math.random() - 0.5), (math.random() - 0.5), (math.random() - 0.5))
- local UnitVectorTowardsUs = Vector3.new((Radius * math.cos(Theta)), 0, (Radius * math.sin(Theta))).Unit
- NewVelocity = (NewVelocity - UnitVectorTowardsUs * NewVelocity:Dot(UnitVectorTowardsUs))
- ParticlePart.Velocity = (NewVelocity.Unit * OrbitingVelocity)
- ParticlePart.RotVelocity = Vector3.new(((math.random() - 0.5) * 10), ((math.random() - 0.5) * 10), ((math.random() - 0.5) * 10))
- local Force = Create("BodyForce"){
- force = Vector3.new((-Mass * OrbitingVelocity * OrbitingVelocity * math.cos(Theta) / RadiusSquared), (Mass * Gravity), (-Mass * OrbitingVelocity * OrbitingVelocity * math.sin(Theta) / RadiusSquared)),
- Parent = ParticlePart,
- }
- local Position = Create("BodyPosition"){
- maxForce = Vector3.new(0, 0, 0),
- Parent = ParticlePart,
- }
- ParticlePart.CFrame = CFrame.new((SpawnPos.X + Radius * math.cos(Theta)), SpawnPos.Y, (SpawnPos.Z + Radius * math.sin(Theta)))
- ParticlePart.Parent = ParticleModel
- table.insert(Particles, {Part = ParticlePart, Force = Force, Position = Position, Fire = {Object = Fire, LastChange = Now}})
- ParticleHit(ParticlePart)
- end
- ParticleModel.Parent = game:GetService("Workspace")
- while ParticleModel and ParticleModel.Parent do
- local Now = tick()
- for i, v in pairs(Particles) do
- local MPos = Torso.Position
- local DPos = (v.Part.Position - MPos)
- local Mass = v.Part:GetMass()
- local UnitVectorTowardsUs = DPos.Unit
- if DPos.Magnitude <= (Radius + 2) then
- v.Position.maxForce = Vector3.new(0, 0, 0)
- v.Force.force = (Mass * Vector3.new((-OrbitingVelocitySquared * DPos.X / RadiusSquared), (-OrbitingVelocitySquared * DPos.Y / RadiusSquared + Gravity), (-OrbitingVelocitySquared * DPos.Z / RadiusSquared)))
- local NewVelocity = (v.Part.Velocity - ( 1 / (1 + math.abs(DPos.Magnitude - Radius))) * UnitVectorTowardsUs * v.Part.Velocity:Dot(UnitVectorTowardsUs))
- v.Part.Velocity = (NewVelocity.Unit * OrbitingVelocity * Vector3.new(1, 1, 1))
- else
- local Mass = (v.Part:GetMass() * Gravity * math.random(75, 100))
- v.Force.force = Vector3.new(0, 0, 0)
- v.Position.maxForce = Vector3.new(Mass, Mass, Mass)
- v.Position.position = (Torso.CFrame + (Torso.CFrame * CFrame.Angles((math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01) ,(math.random(-360, 360) * 0.01))).lookVector * Radius).p
- end
- if (Now - v.Fire.LastChange) >= 2 then
- v.Fire.LastChange = Now
- Spawn(function()
- local NewColor = BrickColor.new(Colors[math.random(1, #Colors)]).Color
- local TransformRate = 1
- Spawn(function()
- TweenColor(v.Fire.Object, "Color", v.Fire.Object.Color, NewColor, TransformRate)
- end)
- Spawn(function()
- TweenColor(v.Fire.Object, "SecondaryColor", v.Fire.Object.SecondaryColor, NewColor, TransformRate)
- end)
- end)
- end
- end
- wait(0.01)
- end
- end
- function CheckIfAlive()
- return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent and Player and Player.Parent) and true) or false)
- end
- function Attack()
- Sounds.Slash:Play()
- local AttackAnims = {Animations.LeftSlash, Animations.RightSlash}
- Swing(AttackAnims)
- end
- function Activated()
- if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
- return
- end
- Tool.Enabled = false
- local Time = RunService.Stepped:wait()
- if (Time - LastAttack) < 0.2 then
- local MousePosition = InvokeClient("MousePosition")
- if MousePosition then
- Lunge(MousePosition.Position)
- end
- else
- Attack()
- end
- LastAttack = Time
- Tool.Enabled = true
- end
- function Equipped(Mouse)
- Character = Tool.Parent
- Humanoid = Character:FindFirstChild("Humanoid")
- Torso = Character:FindFirstChild("Torso")
- Player = Players:GetPlayerFromCharacter(Character)
- if not CheckIfAlive() then
- return
- end
- Sounds.Unsheath:Play()
- Spawn(function()
- Tool.Grip = Grips.Up
- if not Special.Active then
- CreateParticles()
- end
- end)
- ToolEquipped = true
- end
- function Unequipped()
- Tool.Grip = Grips.Up
- ToolEquipped = false
- end
- function OnServerInvoke(player, mode, value)
- if player ~= Player or not ToolEquipped or not value or not CheckIfAlive() then
- return
- end
- if mode == "KeyPress" then
- local Key = value.Key
- local Down = value.Down
- if Key == "q" and Down then
- if not Special.Enabled or Special.Active then
- return
- end
- local TargetPosition = InvokeClient("MousePosition")
- if not TargetPosition then
- return
- end
- TargetPosition = TargetPosition.Position
- Special.Enabled = false
- Special.Active = true
- for i, v in pairs(Particles) do
- if v and v.Part and v.Part.Parent then
- local Particle = v.Part:Clone()
- if v.Part and v.Part.Parent then
- v.Part:Destroy()
- end
- ParticleHit(Particle)
- Particle.Name = "Effect"
- for i, v in pairs(Particle:GetChildren()) do
- if string.find(string.lower(v.ClassName), string.lower("Body")) then
- v:Destroy()
- end
- end
- v.Fire.Object.Heat = 15
- v.Fire.Object.Size = 5
- local Direction = CFrame.new(Particle.Position, TargetPosition)
- local Mass = (Particle:GetMass() * Gravity)
- local Force = 100
- local Velocity = (Direction.lookVector * Force)
- local BodyVelocity = Create("BodyVelocity"){
- maxForce = Vector3.new(Mass, Mass, Mass),
- velocity = Velocity,
- Parent = Particle,
- }
- Particle.RotVelocity = Vector3.new(0, 0, 0)
- Particle.Velocity = Velocity
- Debris:AddItem(Particle, 3)
- Particle.Parent = game:GetService("Workspace")
- end
- end
- wait(Special.ReloadTime)
- Special.Active = false
- if ToolEquipped and CheckIfAlive() then
- CreateParticles()
- end
- Special.Enabled = true
- end
- end
- end
- function InvokeClient(Mode, Value)
- local ClientReturn = nil
- pcall(function()
- ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
- end)
- return ClientReturn
- end
- ServerControl.OnServerInvoke = OnServerInvoke
- Handle.Touched:connect(Blow)
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- end))
- Script177.Name = "RemoverScript"
- Script177.Parent = Script176
- Script177.Disabled = true
- table.insert(cors,sandbox(Script177,function()
- --Made by Luckymaxer
- Model = script.Parent
- Debris = game:GetService("Debris")
- Creator = script:FindFirstChild("Creator")
- Tool = script:FindFirstChild("Tool")
- FadeRate = 0.025
- Rate = (1 / 15)
- Removing = false
- function DestroyModel()
- if Removing then
- return
- end
- Model.Name = ""
- for i, v in pairs(Model:GetChildren()) do
- if v:IsA("BasePart") then
- v.Transparency = 1
- v.Anchored = true
- v.CanCollide = false
- for ii, vv in pairs(v:GetChildren()) do
- if vv:IsA("Fire") or vv:IsA("Smoke") or vv:IsA("Sparkles") or vv:IsA("Light") or vv:IsA("ParticleEmitter") then
- vv.Enabled = false
- end
- end
- end
- end
- Removing = true
- Debris:AddItem(Model, 1.5)
- end
- function ClearModel()
- if Removing then
- return
- end
- local Parts = {}
- for i, v in pairs(Model:GetChildren()) do
- if v:IsA("BasePart") then
- table.insert(Parts, v)
- end
- end
- if #Parts == 0 then
- Removing = true
- Model.Name = ""
- Debris:AddItem(Model, 0.5)
- end
- end
- if not Creator or not Creator.Value or not Creator.Value:IsA("Player") or not Creator.Value.Parent or not Tool or not Tool.Value or not Tool.Value.Parent then
- DestroyModel()
- return
- end
- Creator = Creator.Value
- Tool = Tool.Value
- Character = Creator.Character
- if not Character then
- DestroyModel()
- return
- end
- Creator.Changed:connect(function(Property)
- if Property == "Parent" and not Creator.Parent then
- DestroyModel()
- end
- end)
- Character.Changed:connect(function(Property)
- if Property == "Parent" and not Character.Parent then
- DestroyModel()
- end
- end)
- Tool.Changed:connect(function(Property)
- if Property == "Parent" then
- DestroyModel()
- end
- end)
- Model.ChildRemoved:connect(function(Child)
- ClearModel()
- end)
- wait(1)
- ClearModel()
- end))
- ParticleEmitter178.Name = "Fire"
- ParticleEmitter178.Parent = Script176
- ParticleEmitter178.Transparency = NumberSequence.new(0.75,0.75)
- ParticleEmitter178.Rotation = NumberRange.new(4, 5)
- ParticleEmitter178.Size = NumberSequence.new(0,0.875,1.25)
- ParticleEmitter178.Enabled = false
- ParticleEmitter178.LightEmission = 0.75
- ParticleEmitter178.Texture = "rbxasset://textures/particles/fire_main.dds"
- ParticleEmitter178.ZOffset = 1
- ParticleEmitter178.Lifetime = NumberRange.new(0.75, 0.75)
- ParticleEmitter178.Rate = 1000
- ParticleEmitter178.RotSpeed = NumberRange.new(5, 8)
- ParticleEmitter178.Speed = NumberRange.new(0, 0)
- Script179.Name = "ParticleScript"
- Script179.Parent = Script176
- Script179.Disabled = true
- table.insert(cors,sandbox(Script179,function()
- --Rescripted by Luckymaxer
- Particle = script.Parent
- Duration = Particle:WaitForChild("Duration")
- wait(Duration.Value)
- Particle.Enabled = false
- end))
- LocalScript180.Parent = Tool169
- table.insert(cors,sandbox(LocalScript180,function()
- --Made by Luckymaxer
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Players = game:GetService("Players")
- RunService = game:GetService("RunService")
- ContentProvider = game:GetService("ContentProvider")
- RbxUtility = LoadLibrary("RbxUtility")
- Create = RbxUtility.Create
- Animations = {}
- ServerControl = Tool:WaitForChild("ServerControl")
- ClientControl = Tool:WaitForChild("ClientControl")
- Rate = (1 / 60)
- ToolEquipped = false
- function SetAnimation(mode, value)
- if not ToolEquipped or not CheckIfAlive() then
- return
- end
- local function StopAnimation(Animation)
- for i, v in pairs(Animations) do
- if v.Animation == Animation then
- v.AnimationTrack:Stop(value.EndFadeTime)
- if v.TrackStopped then
- v.TrackStopped:disconnect()
- end
- table.remove(Animations, i)
- end
- end
- end
- if mode == "PlayAnimation" then
- for i, v in pairs(Animations) do
- if v.Animation == value.Animation then
- if value.Speed then
- v.AnimationTrack:AdjustSpeed(value.Speed)
- return
- elseif value.Weight or value.FadeTime then
- v.AnimationTrack:AdjustWeight(value.Weight, value.FadeTime)
- return
- else
- StopAnimation(value.Animation, false)
- end
- end
- end
- local AnimationMonitor = Create("Model"){}
- local TrackEnded = Create("StringValue"){Name = "Ended"}
- local AnimationTrack = Humanoid:LoadAnimation(value.Animation)
- local TrackStopped
- if not value.Manual then
- TrackStopped = AnimationTrack.Stopped:connect(function()
- if TrackStopped then
- TrackStopped:disconnect()
- end
- StopAnimation(value.Animation, true)
- TrackEnded.Parent = AnimationMonitor
- end)
- end
- table.insert(Animations, {Animation = value.Animation, AnimationTrack = AnimationTrack, TrackStopped = TrackStopped})
- AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed)
- if TrackStopped then
- AnimationMonitor:WaitForChild(TrackEnded.Name)
- end
- return TrackEnded.Name
- elseif mode == "StopAnimation" and value then
- StopAnimation(value.Animation)
- end
- end
- function CheckIfAlive()
- return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false)
- end
- function Equipped(Mouse)
- Character = Tool.Parent
- Player = Players:GetPlayerFromCharacter(Character)
- Humanoid = Character:FindFirstChild("Humanoid")
- ToolEquipped = true
- if not CheckIfAlive() then
- return
- end
- Spawn(function()
- PlayerMouse = Player:GetMouse()
- Mouse.Button1Down:connect(function()
- InvokeServer("Button1Click", {Down = true})
- end)
- Mouse.Button1Up:connect(function()
- InvokeServer("Button1Click", {Down = false})
- end)
- Mouse.KeyDown:connect(function(Key)
- InvokeServer("KeyPress", {Key = Key, Down = true})
- end)
- Mouse.KeyUp:connect(function(Key)
- InvokeServer("KeyPress", {Key = Key, Down = false})
- end)
- for i, v in pairs(Tool:GetChildren()) do
- if v:IsA("Animation") then
- ContentProvider:Preload(v.AnimationId)
- end
- end
- end)
- end
- function Unequipped()
- for i, v in pairs(Animations) do
- if v and v.AnimationTrack then
- v.AnimationTrack:Stop()
- end
- end
- Animations = {}
- ToolEquipped = false
- end
- function InvokeServer(mode, value)
- local ServerReturn = nil
- pcall(function()
- ServerReturn = ServerControl:InvokeServer(mode, value)
- end)
- return ServerReturn
- end
- function OnClientInvoke(mode, value)
- if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
- SetAnimation("PlayAnimation", value)
- elseif mode == "StopAnimation" and value then
- SetAnimation("StopAnimation", value)
- elseif mode == "PlaySound" and value then
- value:Play()
- elseif mode == "StopSound" and value then
- value:Stop()
- elseif mode == "MousePosition" then
- return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target}
- end
- end
- ClientControl.OnClientInvoke = OnClientInvoke
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- end))
- LocalScript181.Name = "MouseIcon"
- LocalScript181.Parent = Tool169
- table.insert(cors,sandbox(LocalScript181,function()
- --Made by Luckymaxer
- Mouse_Icon = "rbxasset://textures/GunCursor.png"
- Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
- Tool = script.Parent
- Mouse = nil
- function UpdateIcon()
- if Mouse then
- Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
- end
- end
- function OnEquipped(ToolMouse)
- Mouse = ToolMouse
- UpdateIcon()
- end
- function OnChanged(Property)
- if Property == "Enabled" then
- UpdateIcon()
- end
- end
- Tool.Equipped:connect(OnEquipped)
- Tool.Changed:connect(OnChanged)
- end))
- Animation182.Name = "Lunge"
- Animation182.Parent = Tool169
- Animation182.AnimationId = "http://www.roblox.com/asset/?id=285965988"
- Animation183.Name = "RightSlash"
- Animation183.Parent = Tool169
- Animation183.AnimationId = "http://www.roblox.com/asset/?id=285551640"
- Animation184.Name = "LeftSlash"
- Animation184.Parent = Tool169
- Animation184.AnimationId = "http://www.roblox.com/asset/?id=285552468"
- Script185.Parent = Tool169
- table.insert(cors,sandbox(Script185,function()
- function LOL()
- script.Parent.Handle.AnimeMusic:Play()
- script.Parent.Handle.AnimeMusic.TimePosition = 0.65
- end
- function LOL2()
- script.Parent.Handle.AnimeMusic:Stop()
- end
- script.Parent.Equipped:connect(LOL)
- script.Parent.Unequipped:connect(LOL2)
- end))
- Tool186.Name = "Resyncable"
- Tool186.Parent = mas
- Tool186.GripForward = Vector3.new(-0, 1, -0)
- Tool186.GripRight = Vector3.new(0, 0, 1)
- Tool186.GripUp = Vector3.new(-1, 0, 0)
- Tool186.ToolTip = "My friends head"
- RemoteEvent187.Name = "Remote"
- RemoteEvent187.Parent = Tool186
- NumberValue188.Name = "Resistance"
- NumberValue188.Parent = Tool186
- NumberValue188.Value = 20
- Model189.Parent = NumberValue188
- Part190.Name = "Head"
- Part190.Parent = Model189
- Part190.BrickColor = BrickColor.new("Cyan")
- Part190.Rotation = Vector3.new(0, 90, 0)
- Part190.FormFactor = Enum.FormFactor.Symmetric
- Part190.Size = Vector3.new(2, 1, 1)
- Part190.CFrame = CFrame.new(37.6467857, -5.81796122, -459.375214, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part190.TopSurface = Enum.SurfaceType.Smooth
- Part190.Color = Color3.new(0.0156863, 0.686275, 0.92549)
- Part190.Position = Vector3.new(37.6467857, -5.81796122, -459.375214)
- Part190.Orientation = Vector3.new(0, 90, 0)
- Part190.Color = Color3.new(0.0156863, 0.686275, 0.92549)
- SpecialMesh191.Parent = Part190
- SpecialMesh191.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh191.Scale = Vector3.new(1.25, 1.25, 1.25)
- Attachment192.Name = "HatAttachment"
- Attachment192.Parent = Part190
- Attachment192.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment192.Position = Vector3.new(0, 0.600000024, 0)
- Attachment193.Name = "HairAttachment"
- Attachment193.Parent = Part190
- Attachment193.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment193.Position = Vector3.new(0, 0.600000024, 0)
- Attachment194.Name = "FaceFrontAttachment"
- Attachment194.Parent = Part190
- Attachment194.CFrame = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment194.Position = Vector3.new(0, 0, -0.600000024)
- Attachment195.Name = "FaceCenterAttachment"
- Attachment195.Parent = Part190
- Decal196.Name = "face"
- Decal196.Parent = Part190
- Decal196.Texture = "http://www.roblox.com/asset/?id=19366214"
- Weld197.Name = "HeadWeld"
- Weld197.Parent = Part190
- Weld197.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld197.C1 = CFrame.new(0.699999988, 0.75, -0.5, 0.957936287, -0, 0.286980897, 0, 1, 0, -0.286980897, 0, 0.957936287)
- Weld197.Part0 = Part190
- Weld197.Part1 = Part207
- Sound198.Parent = Part190
- Sound198.SoundId = "rbxassetid://681582832"
- Sound198.Volume = 4
- Humanoid199.Parent = Model189
- Accessory200.Name = "MessySpikes"
- Accessory200.Parent = Model189
- Accessory200.AttachmentPos = Vector3.new(0.0500000007, 0.129999995, -0.200000003)
- Part201.Name = "Handle"
- Part201.Parent = Accessory200
- Part201.Rotation = Vector3.new(0, 90, 0)
- Part201.RotVelocity = Vector3.new(1, 1, 1)
- Part201.CanCollide = false
- Part201.FormFactor = Enum.FormFactor.Custom
- Part201.Size = Vector3.new(1.4000001, 1.79999995, 1.60000014)
- Part201.CFrame = CFrame.new(37.8470573, -5.44796133, -459.325226, -3.26223034e-24, -4.1444221e-16, 1, 7.87137555e-09, 1, 4.1444221e-16, -1, 7.87137555e-09, 0)
- Part201.BottomSurface = Enum.SurfaceType.Smooth
- Part201.TopSurface = Enum.SurfaceType.Smooth
- Part201.Position = Vector3.new(37.8470573, -5.44796133, -459.325226)
- Part201.Orientation = Vector3.new(0, 90, 0)
- SpecialMesh202.Parent = Part201
- SpecialMesh202.MeshId = "http://www.roblox.com/asset/?id=62246019"
- SpecialMesh202.TextureId = "http://www.roblox.com/asset/?id=62246077"
- SpecialMesh202.MeshType = Enum.MeshType.FileMesh
- Attachment203.Name = "HairAttachment"
- Attachment203.Parent = Part201
- Attachment203.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment203.CFrame = CFrame.new(0.0500000082, 0.230000019, -0.200272247, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment203.Position = Vector3.new(0.0500000082, 0.230000019, -0.200272247)
- Attachment203.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment203.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value204.Name = "OriginalSize"
- Vector3Value204.Parent = Part201
- Vector3Value204.Value = Vector3.new(1.4000001, 1.79999995, 1.60000014)
- Weld205.Name = "AccessoryWeld"
- Weld205.Parent = Part201
- Weld205.C0 = CFrame.new(0.0500000082, 0.230000019, -0.200272247, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Weld205.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld205.Part0 = Part201
- Weld205.Part1 = Part190
- Accessory206.Name = "Parrot"
- Accessory206.Parent = Model189
- Accessory206.AttachmentForward = Vector3.new(-0.286980897, -0, -0.957936287)
- Accessory206.AttachmentPos = Vector3.new(0.699999988, 0.75, -0.5)
- Accessory206.AttachmentRight = Vector3.new(0.957936287, 0, -0.286980897)
- Part207.Name = "Handle"
- Part207.Parent = Accessory206
- Part207.Rotation = Vector3.new(0, 73.3199997, 0)
- Part207.RotVelocity = Vector3.new(1, 1, 1)
- Part207.CanCollide = false
- Part207.FormFactor = Enum.FormFactor.Symmetric
- Part207.Size = Vector3.new(1, 1, 1)
- Part207.CFrame = CFrame.new(37.9251404, -6.06796122, -458.561157, 0.286980897, 6.04542789e-30, 0.957936287, -2.38961469e-30, 1, -5.59500065e-30, -0.957936287, -6.83440315e-31, 0.286980897)
- Part207.BottomSurface = Enum.SurfaceType.Smooth
- Part207.TopSurface = Enum.SurfaceType.Smooth
- Part207.Position = Vector3.new(37.9251404, -6.06796122, -458.561157)
- Part207.Orientation = Vector3.new(0, 73.3199997, 0)
- SpecialMesh208.Parent = Part207
- SpecialMesh208.MeshId = "http://www.roblox.com/asset/?id=20708326"
- SpecialMesh208.TextureId = "http://www.roblox.com/asset/?id=20708319"
- SpecialMesh208.MeshType = Enum.MeshType.FileMesh
- Attachment209.Name = "LeftCollarAttachment"
- Attachment209.Parent = Part207
- Attachment209.Rotation = Vector3.new(-3.61587208e-28, 16.6772938, 1.42926872e-28)
- Attachment209.CFrame = CFrame.new(-0.258014262, -0.25, -0.213280112, 0.957936287, -2.38961469e-30, 0.286980897, 6.83440315e-31, 1, 6.04542789e-30, -0.286980897, -5.59500065e-30, 0.957936287)
- Attachment209.Position = Vector3.new(-0.258014262, -0.25, -0.213280112)
- Attachment209.Axis = Vector3.new(0.957936287, 6.83440315e-31, -0.286980897)
- Attachment209.Orientation = Vector3.new(-3.46377513e-28, 16.6772938, 3.91582454e-29)
- Vector3Value210.Name = "OriginalSize"
- Vector3Value210.Parent = Part207
- Vector3Value210.Value = Vector3.new(1, 1, 1)
- Accessory211.Name = "Ultra-Fabulous Hair"
- Accessory211.Parent = Model189
- Part212.Name = "Handle"
- Part212.Parent = Accessory211
- Part212.Rotation = Vector3.new(0, 90, 0)
- Part212.RotVelocity = Vector3.new(1, 1, 1)
- Part212.CanCollide = false
- Part212.FormFactor = Enum.FormFactor.Symmetric
- Part212.Size = Vector3.new(2, 2, 2)
- Part212.CFrame = CFrame.new(37.6470566, -5.31796122, -459.375214, -3.26223034e-24, -4.1444221e-16, 1, 7.87137555e-09, 1, 4.1444221e-16, -1, 7.87137555e-09, 0)
- Part212.BottomSurface = Enum.SurfaceType.Smooth
- Part212.TopSurface = Enum.SurfaceType.Smooth
- Part212.Position = Vector3.new(37.6470566, -5.31796122, -459.375214)
- Part212.Orientation = Vector3.new(0, 90, 0)
- SpecialMesh213.Parent = Part212
- SpecialMesh213.MeshId = "http://www.roblox.com/asset/?id=16627529"
- SpecialMesh213.Scale = Vector3.new(1.04999995, 1.04999995, 1.04999995)
- SpecialMesh213.TextureId = "http://www.roblox.com/asset/?id=17423956"
- SpecialMesh213.MeshType = Enum.MeshType.FileMesh
- SpecialMesh213.Scale = Vector3.new(1.04999995, 1.04999995, 1.04999995)
- Attachment214.Name = "HairAttachment"
- Attachment214.Parent = Part212
- Attachment214.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment214.CFrame = CFrame.new(8.65838956e-09, 0.0999999046, -0.000272244215, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment214.Position = Vector3.new(8.65838956e-09, 0.0999999046, -0.000272244215)
- Attachment214.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment214.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value215.Name = "OriginalSize"
- Vector3Value215.Parent = Part212
- Vector3Value215.Value = Vector3.new(2, 2, 2)
- Weld216.Name = "AccessoryWeld"
- Weld216.Parent = Part212
- Weld216.C0 = CFrame.new(8.65838956e-09, 0.0999999046, -0.000272244215, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Weld216.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld216.Part0 = Part212
- Weld216.Part1 = Part190
- Script217.Name = "qPerfectionWeld"
- Script217.Parent = Tool186
- table.insert(cors,sandbox(Script217,function()
- -- Created by Quenty (@Quenty, follow me on twitter).
- -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
- -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
- --[[ INSTRUCTIONS
- - Place in the model
- - Make sure model is anchored
- - That's it. It will weld the model and all children.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- 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.
- ]]
- --[[ DOCUMENTATION
- - 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.
- - Will work in PBS servers
- - Will work as long as it starts out with the part anchored
- - Stores the relative CFrame as a CFrame value
- - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
- - Utilizes a recursive algorith to find all parts in the model
- - Will reweld on script reparent if the script is initially parented to a tool.
- - Welds as fast as possible
- ]]
- -- qPerfectionWeld.lua
- -- Created 10/6/2014
- -- Author: Quenty
- -- Version 1.0.3
- -- Updated 10/14/2014 - Updated to 1.0.1
- --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
- -- Updated 10/14/2014 - Updated to 1.0.2
- --- Fixed bug fix.
- -- Updated 10/14/2014 - Updated to 1.0.3
- --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
- 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).
- local function CallOnChildren(Instance, FunctionToCall)
- -- Calls a function on each of the children of a certain object, using recursion.
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- CallOnChildren(Child, FunctionToCall)
- end
- end
- local function GetNearestParent(Instance, ClassName)
- -- Returns the nearest parent of a certain class, or returns nil
- local Ancestor = Instance
- repeat
- Ancestor = Ancestor.Parent
- if Ancestor == nil then
- return nil
- end
- until Ancestor:IsA(ClassName)
- return Ancestor
- end
- local function GetBricks(StartInstance)
- local List = {}
- -- if StartInstance:IsA("BasePart") then
- -- List[#List+1] = StartInstance
- -- end
- CallOnChildren(StartInstance, function(Item)
- if Item:IsA("BasePart") then
- List[#List+1] = Item;
- end
- end)
- return List
- end
- local function Modify(Instance, Values)
- -- Modifies an Instance by using a table.
- assert(type(Values) == "table", "Values is not a table");
- for Index, Value in next, Values do
- if type(Index) == "number" then
- Value.Parent = Instance
- else
- Instance[Index] = Value
- end
- end
- return Instance
- end
- local function Make(ClassType, Properties)
- -- Using a syntax hack to create a nice way to Make new items.
- return Modify(Instance.new(ClassType), Properties)
- end
- local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
- local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
- local function HasWheelJoint(Part)
- for _, SurfaceName in pairs(Surfaces) do
- for _, HingSurfaceName in pairs(HingSurfaces) do
- if Part[SurfaceName].Name == HingSurfaceName then
- return true
- end
- end
- end
- return false
- end
- local function ShouldBreakJoints(Part)
- --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
- -- definitely some edge cases.
- if NEVER_BREAK_JOINTS then
- return false
- end
- if HasWheelJoint(Part) then
- return false
- end
- local Connected = Part:GetConnectedParts()
- if #Connected == 1 then
- return false
- end
- for _, Item in pairs(Connected) do
- if HasWheelJoint(Item) then
- return false
- elseif not Item:IsDescendantOf(script.Parent) then
- return false
- end
- end
- return true
- end
- local function WeldTogether(Part0, Part1, JointType, WeldParent)
- --- Weld's 2 parts together
- -- @param Part0 The first part
- -- @param Part1 The second part (Dependent part most of the time).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
- -- @return The weld created.
- JointType = JointType or "Weld"
- local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
- local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
- Modify(NewWeld, {
- Name = "qCFrameWeldThingy";
- Part0 = Part0;
- Part1 = Part1;
- C0 = CFrame.new();--Part0.CFrame:inverse();
- C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
- Parent = Part1;
- })
- if not RelativeValue then
- RelativeValue = Make("CFrameValue", {
- Parent = Part1;
- Name = "qRelativeCFrameWeldValue";
- Archivable = true;
- Value = NewWeld.C1;
- })
- end
- return NewWeld
- end
- local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
- -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
- -- @param MainPart The part to weld the model to (can be in the model).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
- for _, Part in pairs(Parts) do
- if ShouldBreakJoints(Part) then
- Part:BreakJoints()
- end
- end
- for _, Part in pairs(Parts) do
- if Part ~= MainPart then
- WeldTogether(MainPart, Part, JointType, MainPart)
- end
- end
- if not DoNotUnanchor then
- for _, Part in pairs(Parts) do
- Part.Anchored = false
- end
- MainPart.Anchored = false
- end
- end
- local function PerfectionWeld()
- local Tool = GetNearestParent(script, "Tool")
- local Parts = GetBricks(script.Parent)
- 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]
- if PrimaryPart then
- WeldParts(Parts, PrimaryPart, "Weld", false)
- else
- warn("qWeld - Unable to weld part")
- end
- return Tool
- end
- local Tool = PerfectionWeld()
- if Tool and script.ClassName == "Script" then
- --- Don't bother with local scripts
- script.Parent.AncestryChanged:connect(function()
- PerfectionWeld()
- end)
- end
- -- Created by Quenty (@Quenty, follow me on twitter).
- end))
- Part218.Name = "Handle"
- Part218.Parent = Tool186
- Part218.Material = Enum.Material.Metal
- Part218.BrickColor = BrickColor.new("Toothpaste")
- Part218.Transparency = 1
- Part218.Rotation = Vector3.new(-180, -2.25999999, 90)
- Part218.Anchored = true
- Part218.CanCollide = false
- Part218.FormFactor = Enum.FormFactor.Custom
- Part218.Size = Vector3.new(0.200000003, 0.573924482, 1)
- Part218.CFrame = CFrame.new(37.5511932, -5.86179686, -459.379089, 0, -0.999221265, -0.039457012, -1, 0, 0, 0, 0.039457012, -0.999221265)
- Part218.Color = Color3.new(0, 1, 1)
- Part218.Position = Vector3.new(37.5511932, -5.86179686, -459.379089)
- Part218.Orientation = Vector3.new(0, -177.73999, -90)
- Part218.Color = Color3.new(0, 1, 1)
- Sound219.Name = "AnimeMusic"
- Sound219.Parent = Part218
- Sound219.SoundId = "rbxassetid://857499889"
- Sound219.Volume = 10
- Sound219.Looped = true
- LocalScript220.Name = "Client"
- LocalScript220.Parent = Tool186
- table.insert(cors,sandbox(LocalScript220,function()
- local Player = game:GetService("Players").LocalPlayer
- while not Player.Character do wait() end
- local Character = Player.Character
- local Human = Character:WaitForChild("Humanoid")
- local CAS = game:GetService("ContextActionService")
- local ActionName = "GiantAngelicSword"
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Animations = {
- Hold = Tool:WaitForChild("Hold"),
- Slam = Tool:WaitForChild("Slam"),
- SwingRightToLeft = Tool:WaitForChild("SwingRightToLeft"),
- SwingLeftToRight = Tool:WaitForChild("SwingLeftToRight"),
- }
- local HoldTrack
- function playAnimation(name, fade, weight, speed)
- if Animations[name] then
- local track = Human:LoadAnimation(Animations[name])
- track:Play(fade, weight, speed)
- end
- end
- function onAction(actionName, inputState, inputObject)
- if inputState == Enum.UserInputState.Begin then
- Remote:FireServer("Attack")
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --animate
- HoldTrack = Human:LoadAnimation(Animations.Hold)
- HoldTrack:Play(0.5)
- --bind actions
- CAS:BindActionToInputTypes(
- ActionName,
- onAction,
- false,
- Enum.UserInputType.MouseButton1,
- Enum.UserInputType.Touch
- )
- end
- function onUnequipped()
- --unbind
- CAS:UnbindAction(ActionName)
- --stop animation
- if HoldTrack then
- HoldTrack:Stop()
- end
- end
- function onRemote(func, ...)
- if func == "PlayAnimation" then
- playAnimation(...)
- end
- end
- --set up events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnClientEvent:connect(onRemote)
- end))
- Script221.Name = "Server"
- Script221.Parent = Tool186
- table.insert(cors,sandbox(Script221,function()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Handle = Tool:WaitForChild("Handle")
- local Motor
- local AttackNumber = 1
- local AttackDamage = 50
- local AttackWindow = 0.6
- local AttackRest = 0
- local AttackAble = true
- local AttackDamaging = true
- local AttackHit = {}
- function getPlayerChar()
- local char = Tool.Parent
- local player = game:GetService("Players"):GetPlayerFromCharacter(char)
- return player, char
- end
- function convertWeldToMotor(weld)
- local m = Instance.new("Motor6D")
- m.Name = weld.Name
- m.Part0 = weld.Part0
- m.Part1 = weld.Part1
- m.C0 = weld.C0
- m.C1 = weld.C1
- local parent = weld.Parent
- weld:Destroy()
- m.Parent = parent
- Motor = m
- end
- function changeGrip()
- local player, char = getPlayerChar()
- while not char:FindFirstChild("Right Arm") do wait() end
- while not char["Right Arm"]:FindFirstChild("RightGrip") do wait() end
- convertWeldToMotor(char["Right Arm"].RightGrip)
- end
- function contains(t, v)
- for _, val in pairs(t) do
- if val == v then
- return true
- end
- end
- return false
- end
- function tagHuman(human)
- local player, char = getPlayerChar()
- local val = Instance.new("ObjectValue")
- val.Name = "creator"
- val.Value = player
- val.Parent = human
- game:GetService("Debris"):AddItem(val, 1)
- end
- function openAttackWindow()
- AttackHit = {}
- AttackDamaging = true
- delay(AttackWindow, function()
- AttackDamaging = false
- end)
- end
- function onTouched(part)
- if not AttackDamaging then return end
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- local pitch = math.random(60, 80)/100
- playSound("HitSound", pitch, 1)
- playSound("HitSound2", pitch + 0.3, 1)
- end
- end
- end
- function onTouchedSpecial(part)
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- end
- end
- end
- function special()
- local player, char = getPlayerChar()
- local root = char:FindFirstChild("Zombie")
- if root then
- openAttackWindow()
- local c = root.CFrame
- local dz = -8
- for t = 0, 1, 1/15 do
- delay(t, function()
- local pos = c:pointToWorldSpace(Vector3.new(0, -2.5, dz))
- local e = Instance.new("Explosion")
- e.BlastPressure = 0
- e.Position = pos
- e.Hit:connect(onTouchedSpecial)
- e.Parent = workspace
- dz = dz - 6
- end)
- end
- playSound("Explosion", 0.9, 1)
- end
- end
- function playSound(name, pitch, volume)
- local sound = Handle:FindFirstChild(name)
- if sound then
- sound.Pitch = pitch or math.random(90, 110)/100
- sound.Volume = volume or 0.5
- sound:Play()
- end
- end
- function attack()
- if not AttackAble then return end
- AttackAble = false
- delay(AttackRest, function()
- AttackAble = true
- end)
- local player, char = getPlayerChar()
- if AttackNumber < 5 then
- if AttackNumber == 1 or AttackNumber == 3 then
- Remote:FireClient(player, "PlayAnimation", "SwingRightToLeft")
- elseif AttackNumber == 2 or AttackNumber == 4 then
- Remote:FireClient(player, "PlayAnimation", "SwingLeftToRight")
- end
- openAttackWindow()
- playSound("SwingSound")
- else
- AttackNumber = 0
- end
- AttackNumber = AttackNumber + 1
- end
- function onRemote(callingPlayer, func, ...)
- local player, char = getPlayerChar()
- if callingPlayer == player then
- if func == "Attack" then
- attack()
- end
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --convert grip to a motor
- changeGrip()
- end
- function onUnequipped()
- if Motor then
- Motor:Destroy()
- end
- end
- --connect events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnServerEvent:connect(onRemote)
- Handle.Touched:connect(onTouched)
- end))
- Animation222.Name = "SwingRightToLeft"
- Animation222.Parent = Tool186
- Animation222.AnimationId = "http://www.roblox.com/asset/?id=184573779"
- Animation223.Name = "SwingLeftToRight"
- Animation223.Parent = Tool186
- Animation223.AnimationId = "http://www.roblox.com/asset/?id=184573748"
- Animation224.Name = "Slam"
- Animation224.Parent = Tool186
- Animation224.AnimationId = "http://www.roblox.com/asset/?id=184574340"
- Animation225.Name = "Hold"
- Animation225.Parent = Tool186
- Animation225.AnimationId = "http://www.roblox.com/asset/?id=184572142"
- Script226.Parent = Tool186
- table.insert(cors,sandbox(Script226,function()
- function LOL()
- script.Parent.Handle.AnimeMusic:Play()
- end
- function LOL2()
- script.Parent.Handle.AnimeMusic:Stop()
- end
- script.Parent.Equipped:connect(LOL)
- script.Parent.Unequipped:connect(LOL2)
- end))
- Model227.Name = "Resyncable"
- Model227.Parent = Tool186
- Shirt228.Name = "Shirt"
- Shirt228.Parent = Tool186
- Shirt228.ShirtTemplate = "http://www.roblox.com/asset/?id=41770216"
- Pants229.Name = "Pants"
- Pants229.Parent = Tool186
- Pants229.PantsTemplate = "http://www.roblox.com/asset/?id=45721839"
- BodyColors230.Parent = Tool186
- BodyColors230.HeadColor = BrickColor.new("Cyan")
- BodyColors230.LeftArmColor = BrickColor.new("Cyan")
- BodyColors230.LeftLegColor = BrickColor.new("Cyan")
- BodyColors230.RightArmColor = BrickColor.new("Cyan")
- BodyColors230.RightLegColor = BrickColor.new("Cyan")
- BodyColors230.TorsoColor = BrickColor.new("Cyan")
- Tool231.Name = "Tree"
- Tool231.Parent = mas
- Tool231.GripForward = Vector3.new(-0, 1, -0)
- Tool231.GripRight = Vector3.new(0, 0, 1)
- Tool231.GripUp = Vector3.new(-1, 0, 0)
- Tool231.ToolTip = "Ultiment Destrution"
- RemoteEvent232.Name = "Remote"
- RemoteEvent232.Parent = Tool231
- NumberValue233.Name = "Resistance"
- NumberValue233.Parent = Tool231
- NumberValue233.Value = 20
- Part234.Parent = NumberValue233
- Part234.Material = Enum.Material.Grass
- Part234.BrickColor = BrickColor.new("Burnt Sienna")
- Part234.Size = Vector3.new(0.234400958, 0.973359227, 0.224468648)
- Part234.CFrame = CFrame.new(37.7221413, -9.27685452, -459.45874, 1.00000441, 0, 2.68220901e-07, 0, 1, 0, -2.68220901e-07, 0, 1.00000441)
- Part234.BottomSurface = Enum.SurfaceType.Smooth
- Part234.TopSurface = Enum.SurfaceType.Smooth
- Part234.Color = Color3.new(0.415686, 0.223529, 0.0352941)
- Part234.Position = Vector3.new(37.7221413, -9.27685452, -459.45874)
- Part234.Color = Color3.new(0.415686, 0.223529, 0.0352941)
- Script235.Name = "qPerfectionWeld"
- Script235.Parent = Tool231
- table.insert(cors,sandbox(Script235,function()
- -- Created by Quenty (@Quenty, follow me on twitter).
- -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
- -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
- --[[ INSTRUCTIONS
- - Place in the model
- - Make sure model is anchored
- - That's it. It will weld the model and all children.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- 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.
- ]]
- --[[ DOCUMENTATION
- - 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.
- - Will work in PBS servers
- - Will work as long as it starts out with the part anchored
- - Stores the relative CFrame as a CFrame value
- - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
- - Utilizes a recursive algorith to find all parts in the model
- - Will reweld on script reparent if the script is initially parented to a tool.
- - Welds as fast as possible
- ]]
- -- qPerfectionWeld.lua
- -- Created 10/6/2014
- -- Author: Quenty
- -- Version 1.0.3
- -- Updated 10/14/2014 - Updated to 1.0.1
- --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
- -- Updated 10/14/2014 - Updated to 1.0.2
- --- Fixed bug fix.
- -- Updated 10/14/2014 - Updated to 1.0.3
- --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
- 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).
- local function CallOnChildren(Instance, FunctionToCall)
- -- Calls a function on each of the children of a certain object, using recursion.
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- CallOnChildren(Child, FunctionToCall)
- end
- end
- local function GetNearestParent(Instance, ClassName)
- -- Returns the nearest parent of a certain class, or returns nil
- local Ancestor = Instance
- repeat
- Ancestor = Ancestor.Parent
- if Ancestor == nil then
- return nil
- end
- until Ancestor:IsA(ClassName)
- return Ancestor
- end
- local function GetBricks(StartInstance)
- local List = {}
- -- if StartInstance:IsA("BasePart") then
- -- List[#List+1] = StartInstance
- -- end
- CallOnChildren(StartInstance, function(Item)
- if Item:IsA("BasePart") then
- List[#List+1] = Item;
- end
- end)
- return List
- end
- local function Modify(Instance, Values)
- -- Modifies an Instance by using a table.
- assert(type(Values) == "table", "Values is not a table");
- for Index, Value in next, Values do
- if type(Index) == "number" then
- Value.Parent = Instance
- else
- Instance[Index] = Value
- end
- end
- return Instance
- end
- local function Make(ClassType, Properties)
- -- Using a syntax hack to create a nice way to Make new items.
- return Modify(Instance.new(ClassType), Properties)
- end
- local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
- local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
- local function HasWheelJoint(Part)
- for _, SurfaceName in pairs(Surfaces) do
- for _, HingSurfaceName in pairs(HingSurfaces) do
- if Part[SurfaceName].Name == HingSurfaceName then
- return true
- end
- end
- end
- return false
- end
- local function ShouldBreakJoints(Part)
- --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
- -- definitely some edge cases.
- if NEVER_BREAK_JOINTS then
- return false
- end
- if HasWheelJoint(Part) then
- return false
- end
- local Connected = Part:GetConnectedParts()
- if #Connected == 1 then
- return false
- end
- for _, Item in pairs(Connected) do
- if HasWheelJoint(Item) then
- return false
- elseif not Item:IsDescendantOf(script.Parent) then
- return false
- end
- end
- return true
- end
- local function WeldTogether(Part0, Part1, JointType, WeldParent)
- --- Weld's 2 parts together
- -- @param Part0 The first part
- -- @param Part1 The second part (Dependent part most of the time).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
- -- @return The weld created.
- JointType = JointType or "Weld"
- local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
- local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
- Modify(NewWeld, {
- Name = "qCFrameWeldThingy";
- Part0 = Part0;
- Part1 = Part1;
- C0 = CFrame.new();--Part0.CFrame:inverse();
- C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
- Parent = Part1;
- })
- if not RelativeValue then
- RelativeValue = Make("CFrameValue", {
- Parent = Part1;
- Name = "qRelativeCFrameWeldValue";
- Archivable = true;
- Value = NewWeld.C1;
- })
- end
- return NewWeld
- end
- local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
- -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
- -- @param MainPart The part to weld the model to (can be in the model).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
- for _, Part in pairs(Parts) do
- if ShouldBreakJoints(Part) then
- Part:BreakJoints()
- end
- end
- for _, Part in pairs(Parts) do
- if Part ~= MainPart then
- WeldTogether(MainPart, Part, JointType, MainPart)
- end
- end
- if not DoNotUnanchor then
- for _, Part in pairs(Parts) do
- Part.Anchored = false
- end
- MainPart.Anchored = false
- end
- end
- local function PerfectionWeld()
- local Tool = GetNearestParent(script, "Tool")
- local Parts = GetBricks(script.Parent)
- 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]
- if PrimaryPart then
- WeldParts(Parts, PrimaryPart, "Weld", false)
- else
- warn("qWeld - Unable to weld part")
- end
- return Tool
- end
- local Tool = PerfectionWeld()
- if Tool and script.ClassName == "Script" then
- --- Don't bother with local scripts
- script.Parent.AncestryChanged:connect(function()
- PerfectionWeld()
- end)
- end
- -- Created by Quenty (@Quenty, follow me on twitter).
- end))
- Part236.Name = "Handle"
- Part236.Parent = Tool231
- Part236.Material = Enum.Material.Metal
- Part236.BrickColor = BrickColor.new("Toothpaste")
- Part236.Transparency = 1
- Part236.Rotation = Vector3.new(0, -89.9799957, 90)
- Part236.Anchored = true
- Part236.CanCollide = false
- Part236.FormFactor = Enum.FormFactor.Custom
- Part236.Size = Vector3.new(0.200000003, 0.573924482, 1)
- Part236.CFrame = CFrame.new(37.5511932, -7.76688814, -459.496155, 0, -1.16422427e-10, -0.99999994, -1, 1.78813934e-07, 0, 8.94069672e-08, 1, 5.82076609e-11)
- Part236.Color = Color3.new(0, 1, 1)
- Part236.Position = Vector3.new(37.5511932, -7.76688814, -459.496155)
- Part236.Orientation = Vector3.new(0, -90, -90)
- Part236.Color = Color3.new(0, 1, 1)
- Sound237.Name = "AnimeMusic"
- Sound237.Parent = Part236
- Sound237.SoundId = "rbxassetid://431432734"
- Sound237.Volume = 10
- Sound237.Looped = true
- LocalScript238.Name = "Client"
- LocalScript238.Parent = Tool231
- table.insert(cors,sandbox(LocalScript238,function()
- local Player = game:GetService("Players").LocalPlayer
- while not Player.Character do wait() end
- local Character = Player.Character
- local Human = Character:WaitForChild("Humanoid")
- local CAS = game:GetService("ContextActionService")
- local ActionName = "GiantAngelicSword"
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Animations = {
- Hold = Tool:WaitForChild("Hold"),
- Slam = Tool:WaitForChild("Slam"),
- SwingRightToLeft = Tool:WaitForChild("SwingRightToLeft"),
- SwingLeftToRight = Tool:WaitForChild("SwingLeftToRight"),
- }
- local HoldTrack
- function playAnimation(name, fade, weight, speed)
- if Animations[name] then
- local track = Human:LoadAnimation(Animations[name])
- track:Play(fade, weight, speed)
- end
- end
- function onAction(actionName, inputState, inputObject)
- if inputState == Enum.UserInputState.Begin then
- Remote:FireServer("Attack")
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --animate
- HoldTrack = Human:LoadAnimation(Animations.Hold)
- HoldTrack:Play(0.5)
- --bind actions
- CAS:BindActionToInputTypes(
- ActionName,
- onAction,
- false,
- Enum.UserInputType.MouseButton1,
- Enum.UserInputType.Touch
- )
- end
- function onUnequipped()
- --unbind
- CAS:UnbindAction(ActionName)
- --stop animation
- if HoldTrack then
- HoldTrack:Stop()
- end
- end
- function onRemote(func, ...)
- if func == "PlayAnimation" then
- playAnimation(...)
- end
- end
- --set up events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnClientEvent:connect(onRemote)
- end))
- Script239.Name = "Server"
- Script239.Parent = Tool231
- table.insert(cors,sandbox(Script239,function()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Handle = Tool:WaitForChild("Handle")
- local Motor
- local AttackNumber = 1
- local AttackDamage = 50
- local AttackWindow = 0.6
- local AttackRest = 0
- local AttackAble = true
- local AttackDamaging = true
- local AttackHit = {}
- function getPlayerChar()
- local char = Tool.Parent
- local player = game:GetService("Players"):GetPlayerFromCharacter(char)
- return player, char
- end
- function convertWeldToMotor(weld)
- local m = Instance.new("Motor6D")
- m.Name = weld.Name
- m.Part0 = weld.Part0
- m.Part1 = weld.Part1
- m.C0 = weld.C0
- m.C1 = weld.C1
- local parent = weld.Parent
- weld:Destroy()
- m.Parent = parent
- Motor = m
- end
- function changeGrip()
- local player, char = getPlayerChar()
- while not char:FindFirstChild("Right Arm") do wait() end
- while not char["Right Arm"]:FindFirstChild("RightGrip") do wait() end
- convertWeldToMotor(char["Right Arm"].RightGrip)
- end
- function contains(t, v)
- for _, val in pairs(t) do
- if val == v then
- return true
- end
- end
- return false
- end
- function tagHuman(human)
- local player, char = getPlayerChar()
- local val = Instance.new("ObjectValue")
- val.Name = "creator"
- val.Value = player
- val.Parent = human
- game:GetService("Debris"):AddItem(val, 1)
- end
- function openAttackWindow()
- AttackHit = {}
- AttackDamaging = true
- delay(AttackWindow, function()
- AttackDamaging = false
- end)
- end
- function onTouched(part)
- if not AttackDamaging then return end
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- local pitch = math.random(60, 80)/100
- playSound("HitSound", pitch, 1)
- playSound("HitSound2", pitch + 0.3, 1)
- end
- end
- end
- function onTouchedSpecial(part)
- local player, char = getPlayerChar()
- if part.Parent and part.Parent ~= char and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if not contains(AttackHit, human) then
- table.insert(AttackHit, human)
- tagHuman(human)
- human:TakeDamage(AttackDamage)
- end
- end
- end
- function special()
- local player, char = getPlayerChar()
- local root = char:FindFirstChild("Zombie")
- if root then
- openAttackWindow()
- local c = root.CFrame
- local dz = -8
- for t = 0, 1, 1/15 do
- delay(t, function()
- local pos = c:pointToWorldSpace(Vector3.new(0, -2.5, dz))
- local e = Instance.new("Explosion")
- e.BlastPressure = 0
- e.Position = pos
- e.Hit:connect(onTouchedSpecial)
- e.Parent = workspace
- dz = dz - 6
- end)
- end
- playSound("Explosion", 0.9, 1)
- end
- end
- function playSound(name, pitch, volume)
- local sound = Handle:FindFirstChild(name)
- if sound then
- sound.Pitch = pitch or math.random(90, 110)/100
- sound.Volume = volume or 0.5
- sound:Play()
- end
- end
- function attack()
- if not AttackAble then return end
- AttackAble = false
- delay(AttackRest, function()
- AttackAble = true
- end)
- local player, char = getPlayerChar()
- if AttackNumber < 5 then
- if AttackNumber == 1 or AttackNumber == 3 then
- Remote:FireClient(player, "PlayAnimation", "SwingRightToLeft")
- elseif AttackNumber == 2 or AttackNumber == 4 then
- Remote:FireClient(player, "PlayAnimation", "SwingLeftToRight")
- end
- openAttackWindow()
- playSound("SwingSound")
- else
- AttackNumber = 0
- end
- AttackNumber = AttackNumber + 1
- end
- function onRemote(callingPlayer, func, ...)
- local player, char = getPlayerChar()
- if callingPlayer == player then
- if func == "Attack" then
- attack()
- end
- end
- end
- function onEquipped()
- --ensure unequip
- onUnequipped()
- --convert grip to a motor
- changeGrip()
- end
- function onUnequipped()
- if Motor then
- Motor:Destroy()
- end
- end
- --connect events
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Remote.OnServerEvent:connect(onRemote)
- Handle.Touched:connect(onTouched)
- end))
- Animation240.Name = "SwingRightToLeft"
- Animation240.Parent = Tool231
- Animation240.AnimationId = "http://www.roblox.com/asset/?id=184573779"
- Animation241.Name = "SwingLeftToRight"
- Animation241.Parent = Tool231
- Animation241.AnimationId = "http://www.roblox.com/asset/?id=184573748"
- Animation242.Name = "Slam"
- Animation242.Parent = Tool231
- Animation242.AnimationId = "http://www.roblox.com/asset/?id=184574340"
- Animation243.Name = "Hold"
- Animation243.Parent = Tool231
- Animation243.AnimationId = "http://www.roblox.com/asset/?id=184572142"
- Script244.Parent = Tool231
- table.insert(cors,sandbox(Script244,function()
- function LOL()
- script.Parent.Handle.AnimeMusic:Play()
- end
- function LOL2()
- script.Parent.Handle.AnimeMusic:Stop()
- end
- script.Parent.Equipped:connect(LOL)
- script.Parent.Unequipped:connect(LOL2)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement