Advertisement
ZKiller

Deimos [ROBLOX]

Jun 27th, 2018
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.55 KB | None | 0 0
  1.  wait(1)
  2. --==MAKING CHARACTER INVISIBLE, FUNCTIONS==--
  3. local char = game.Players.LocalPlayer.Character
  4. local pose = "idle"
  5. local mouse = game.Players.LocalPlayer:GetMouse()
  6. local BeamStart = nil
  7. char.Humanoid.WalkSpeed = 0
  8. char.Animate.Disabled = true
  9. char.Humanoid:LoadAnimation(char.Animate.idle.Animation1):Play()
  10. char.Humanoid.WalkSpeed = 22
  11. function makeBloodParticle(parent)
  12.     local par = Instance.new("ParticleEmitter",parent)
  13.     par.Texture = "http://www.roblox.com/asset/?id=469953941"
  14.     par.RotSpeed = NumberRange.new(1)
  15.     par.Acceleration = Vector3.new(0,-30,0)
  16.     par.Lifetime = NumberRange.new(50)
  17.     par.Rate = 999
  18. end
  19. function cleanHead()
  20.     local things = char:GetChildren()
  21.     for i=1, #things do
  22.         if things[i].ClassName == "Accessory" then
  23.             local t = things[i]
  24.             t.Parent = nil
  25.         end
  26.     end
  27.     char.Head:findFirstChildOfClass("Decal").Parent = nil
  28. end
  29. function cleanShirt()
  30.     local things = char:GetChildren()
  31.     for i=1, #things do
  32.         if things[i].ClassName == "Shirt" then
  33.             local t = things[i]
  34.             t.Parent = nil
  35.         end
  36.     end
  37. end
  38. function cleanPants()
  39.     local things = char:GetChildren()
  40.     for i=1, #things do
  41.         if things[i].ClassName == "Pants" then
  42.             local t = things[i]
  43.             t.Parent = nil
  44.         end
  45.     end
  46. end
  47. function cleanPackage()
  48.     local things = char:GetChildren()
  49.     for i=1, #things do
  50.         if things[i].ClassName == "CharacterMesh" then
  51.             local t = things[i]
  52.             t.Parent = nil
  53.         end
  54.     end
  55. end
  56. function invisible()
  57.     local things = char:GetChildren()
  58.     for i=1, #things do
  59.         if things[i].ClassName == "Part" then
  60.             local t = things[i]
  61.             t.Transparency = 1
  62.         end
  63.     end
  64. end
  65. function rig(motor,C0,C1)
  66.     motor.C0 = C0
  67.     motor.C1 = C1
  68. end
  69. function newPart(size,color,material,shape,weldPart,position,parent,ltm)
  70.     local part = Instance.new("Part",parent)
  71.     part.CanCollide = false
  72.     part.Color = color
  73.     part.Material = material
  74.     part.Shape = shape
  75.     part.Size = size
  76.     part.LocalTransparencyModifier = ltm
  77.     local partWeld = Instance.new("Weld",part)
  78.     partWeld.Part0 = weldPart
  79.     partWeld.Part1 = part
  80.     partWeld.C1 = position
  81. end
  82. function newMeshPart(size,color,material,shape,weldPart,position,parent)
  83.     local part = Instance.new("Part",parent)
  84.     part.CanCollide = false
  85.     part.Color = color
  86.     part.Material = material
  87.     part.Size = size
  88.     local mesh = Instance.new("SpecialMesh",part)
  89.     mesh.MeshType = shape
  90.     local partWeld = Instance.new("Weld",part)
  91.     partWeld.Part0 = weldPart
  92.     partWeld.Part1 = part
  93.     partWeld.C1 = position
  94. end
  95. cleanHead()
  96. cleanShirt()
  97. cleanPants()
  98. cleanPackage()
  99. invisible()
  100. --==NAME TAG==--
  101. local name = Instance.new("BillboardGui",char.Head)
  102. name.Size = UDim2.new(3,0,1,0)
  103. name.LightInfluence = 0
  104. name.StudsOffset = Vector3.new(0,2,0)
  105. local nameText = Instance.new("TextLabel",name)
  106. nameText.Size = UDim2.new(1,0,1,0)
  107. nameText.BackgroundTransparency = 1
  108. nameText.TextScaled = true
  109. nameText.TextStrokeTransparency = 0
  110. nameText.TextColor3 = Color3.new(0,0,0)
  111. nameText.TextStrokeColor3 = Color3.new(255,0,0)
  112. nameText.Text = "Deimos"
  113. --==CHARATCER==--
  114. local dm = Instance.new("Model",char)
  115. dm.Name = "DeimosModel"
  116. newMeshPart(Vector3.new(1,.8,1.5),Color3.fromRGB(170,170,170),Enum.Material.Metal,Enum.MeshType.Sphere,char["Left Leg"],CFrame.new(0,1,.25)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  117. newMeshPart(Vector3.new(1,.8,1.5),Color3.fromRGB(170,170,170),Enum.Material.Metal,Enum.MeshType.Sphere,char["Right Leg"],CFrame.new(0,1,.25)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  118.  
  119. newMeshPart(Vector3.new(2,1.5,1.5),Color3.fromRGB(50,50,50),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(-.2,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
  120. newMeshPart(Vector3.new(2.1,1.45,1.45),Color3.fromRGB(140,140,140),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(-.2,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
  121. newMeshPart(Vector3.new(.3,1.55,1.55),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(-.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
  122. newMeshPart(Vector3.new(1.5,1.5,1.5),Color3.fromRGB(50,50,50),Enum.Material.Metal,Enum.MeshType.Sphere,char["Torso"],CFrame.new(0,-.8,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  123. newMeshPart(Vector3.new(2,.6,.6),Color3.fromRGB(240,240,240),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(-.2,0,.5)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
  124. newMeshPart(Vector3.new(.3,1.6,1.6),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Torso"],CFrame.new(1,0,-.1)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(90)),dm)
  125. newMeshPart(Vector3.new(1.8,2.4,1.8),Color3.fromRGB(255,255,255),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.2,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  126. newMeshPart(Vector3.new(.2,2.2,1.6),Color3.fromRGB(0,0,0),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.2,.15)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  127. newMeshPart(Vector3.new(1.6,.2,1.6),Color3.fromRGB(0,0,0),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.2,.15)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  128.  
  129. newMeshPart(Vector3.new(1,1,1),Color3.fromRGB(255,255,255),Enum.Material.Metal,Enum.MeshType.Sphere,char["Right Arm"],CFrame.new(0,1,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  130. newMeshPart(Vector3.new(1,1,1),Color3.fromRGB(255,255,255),Enum.Material.Metal,Enum.MeshType.Sphere,char["Left Arm"],CFrame.new(0,1,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  131.  
  132. newMeshPart(Vector3.new(.3,1.8,1.8),Color3.fromRGB(25,25,25),Enum.Material.Metal,Enum.MeshType.Cylinder,char["Head"],CFrame.new(.7,0,.1)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(-15),math.rad(90)),dm)
  133. newMeshPart(Vector3.new(1.6,1,.6),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.8,.5)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  134. newMeshPart(Vector3.new(1.4,.4,2),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Sphere,char["Head"],CFrame.new(0,-.6,.5)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),dm)
  135.  
  136. newMeshPart(Vector3.new(.5,.7,.3),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Brick,char["Torso"],CFrame.new(0,.6,-.8)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(45),math.rad(0)),dm)
  137. newMeshPart(Vector3.new(.51,.3,.31),Color3.fromRGB(100,100,100),Enum.Material.Metal,Enum.MeshType.Brick,char["Torso"],CFrame.new(0,.35,-.8)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(45),math.rad(0)),dm)
  138.  
  139. newMeshPart(Vector3.new(.5,.7,.3),Color3.fromRGB(75,75,75),Enum.Material.Metal,Enum.MeshType.Brick,char["Torso"],CFrame.new(0,.6,-.8)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(-45),math.rad(0)),dm)
  140. newMeshPart(Vector3.new(.51,.3,.31),Color3.fromRGB(100,100,100),Enum.Material.Metal,Enum.MeshType.Brick,char["Torso"],CFrame.new(0,.35,-.8)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(-45),math.rad(0)),dm)
  141. --==MUSIC, SOUNDS==--
  142. local music = Instance.new("Sound",char.Torso)
  143. music.SoundId = "rbxassetid://281580184"
  144. music.Volume = 1
  145. music.Looped = true
  146. music:Play()
  147. local shootSound = Instance.new("Sound",char.Head)
  148. shootSound.SoundId = "rbxassetid://165946560"
  149. --==RIGGING==--
  150. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0)))
  151. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0)))
  152. --==RIGHT GUN==--
  153. local part = Instance.new("Part",dm)
  154. part.CanCollide = false
  155. part.Size = Vector3.new(.8,2,2)
  156. local mesh = Instance.new("SpecialMesh",part)
  157. mesh.MeshType = Enum.MeshType.FileMesh
  158. mesh.MeshId = "rbxassetid://453175434"
  159. mesh.TextureId = "rbxassetid://453175461"
  160. mesh.Scale = Vector3.new(.023,.023,.023)
  161. local bs1 = Instance.new("Attachment",part)
  162. bs1.Position = Vector3.new(0, 0.6, 1.8)
  163. BeamStart = bs1
  164. local partWeld = Instance.new("Weld",part)
  165. partWeld.Part0 = char["Right Arm"]
  166. partWeld.Part1 = part
  167. partWeld.C1 = CFrame.new(0,0,-1.4)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(180),math.rad(0))
  168. local s1 = Instance.new("Part",dm)
  169. s1.Transparency = 1
  170. s1.CanCollide = false
  171. s1.Size = Vector3.new(.8,.5,.5)
  172. s1.BrickColor = BrickColor.new('New Yeller')
  173. local mesh = Instance.new("SpecialMesh",s1)
  174. mesh.MeshType = Enum.MeshType.FileMesh
  175. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  176. mesh.Scale = Vector3.new(.3,.6,.3)
  177. local partWeld = Instance.new("Weld",s1)
  178. partWeld.Part0 = part
  179. partWeld.Part1 = s1
  180. partWeld.C1 = CFrame.new(0,-2,.6)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0))
  181. --==LEFT GUN==--
  182. local part = Instance.new("Part",dm)
  183. part.CanCollide = false
  184. part.Size = Vector3.new(.8,2,2)
  185. local mesh = Instance.new("SpecialMesh",part)
  186. mesh.MeshType = Enum.MeshType.FileMesh
  187. mesh.MeshId = "rbxassetid://453175434"
  188. mesh.TextureId = "rbxassetid://453175461"
  189. mesh.Scale = Vector3.new(.023,.023,.023)
  190. local bs2 = Instance.new("Attachment",part)
  191. bs2.Position = Vector3.new(0, 0.6, 1.8)
  192. local partWeld = Instance.new("Weld",part)
  193. partWeld.Part0 = char["Left Arm"]
  194. partWeld.Part1 = part
  195. partWeld.C1 = CFrame.new(0,0,-1.4)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(180),math.rad(0))
  196. local s2 = Instance.new("Part",dm)
  197. s2.Transparency = 1
  198. s2.CanCollide = false
  199. s2.Size = Vector3.new(.8,.5,.5)
  200. s2.BrickColor = BrickColor.new('New Yeller')
  201. local mesh = Instance.new("SpecialMesh",s2)
  202. mesh.MeshType = Enum.MeshType.FileMesh
  203. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  204. mesh.Scale = Vector3.new(.3,.6,.3)
  205. local partWeld = Instance.new("Weld",s1)
  206. partWeld.Part0 = part
  207. partWeld.Part1 = s2
  208. partWeld.C1 = CFrame.new(0,-2,.6)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0))
  209. local d = false
  210. local shooting = false
  211. mouse.Button1Down:connect(function()
  212.     shooting = true
  213. end)
  214. mouse.Button1Up:connect(function()
  215.     shooting = false
  216. end)
  217. while true do
  218.     wait(.01)
  219.     if d == false and shooting == true then
  220.         if BeamStart == bs1 then
  221.             d = true
  222.             shootSound:Play()
  223.             local mp = Instance.new("Part",game.Workspace)
  224.             mp.Locked = true
  225.             mp.Name = "MousePos"
  226.             mp.CFrame = mouse.Hit
  227.             mp.Anchored = true
  228.             mp.Transparency = 1
  229.             mp.Size = Vector3.new(1,1,1)
  230.             local be = Instance.new("Attachment",mp)
  231.             local beam = Instance.new("Beam",mp)
  232.             beam.FaceCamera = true
  233.             beam.Attachment0 = BeamStart
  234.             beam.Attachment1 = be
  235.             rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(0),math.rad(0)))
  236.             s1.Transparency = 0
  237.             beam.Width0 = .3
  238.             beam.Width1 = .3
  239.             wait(.01)
  240.             rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-135),math.rad(0),math.rad(0)))
  241.             s1.Transparency = .3
  242.             beam.Width0 = .2
  243.             beam.Width1 = .2
  244.             wait(.01)
  245.             rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(0),math.rad(0)))
  246.             s1.Transparency = .6
  247.             beam.Width0 = .1
  248.             beam.Width1 = .1
  249.             wait(.01)
  250.             rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0)))
  251.             s1.Transparency = 1
  252.             mp.Parent = nil
  253.             BeamStart = bs2
  254.             d = false
  255.         elseif BeamStart == bs2 then
  256.             d = true
  257.             shootSound:Play()
  258.             local mp = Instance.new("Part",game.Workspace)
  259.             mp.Locked = true
  260.             mp.Name = "MousePos"
  261.             mp.CFrame = mouse.Hit
  262.             mp.Anchored = true
  263.             mp.Transparency = 1
  264.             mp.Size = Vector3.new(1,1,1)
  265.             local be = Instance.new("Attachment",mp)
  266.             local beam = Instance.new("Beam",mp)
  267.             beam.FaceCamera = true
  268.             beam.Attachment0 = BeamStart
  269.             beam.Attachment1 = be
  270.             rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(0),math.rad(0)))
  271.             s2.Transparency = 0
  272.             beam.Width0 = .3
  273.             beam.Width1 = .3
  274.             wait(.01)
  275.             rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-135),math.rad(0),math.rad(0)))
  276.             s2.Transparency = .3
  277.             beam.Width0 = .2
  278.             beam.Width1 = .2
  279.             wait(.01)
  280.             rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-105),math.rad(0),math.rad(0)))
  281.             s2.Transparency = .6
  282.             beam.Width0 = .1
  283.             beam.Width1 = .1
  284.             wait(.01)
  285.             rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1.5,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(0)))
  286.             s2.Transparency = 1
  287.             mp.Parent = nil
  288.             BeamStart = bs1
  289.             d = false
  290.         end
  291.         local target = mouse.Target
  292.         if target ~= nil then
  293.             local h = target.Parent:findFirstChildOfClass("Humanoid")
  294.             if h ~= nil then
  295.                 h.Health = 0
  296.                 h.MaxHealth = 1
  297.                 makeBloodParticle(target)
  298.             end
  299.         end
  300.     end
  301. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement