of     1   

Mario787
#4235152Friday, December 12, 2008 9:24 PM GMT

fff
Mario787
#4235164Friday, December 12, 2008 9:24 PM GMT

t = Instance.new("Tool") t.Parent = game.Players.superface.Backpack t.Name = "Machine Pistol" t.GripUp = Vector3.new(0, 0.99, 0.14) m = Instance.new("SpecialMesh") m.Parent = t m.MeshType = "Sphere" m.Scale = Vector3.new(0.1, 0.1, 0.1) h = Instance.new("Part") h.Parent = t h.BrickColor = BrickColor.new(194) h.Reflectance = 0 h.Transparency = 0 h.Name = "Handle" h.Position = Vector3.new(0,0,0) h.Anchored = false h.CanCollide = true h.Locked = true h.TopSurface = "Smooth" h.BottomSurface = "Smooth" h.Shape = 1 h.Size = Vector3.new(1,1,1) h.formFactor = 0 hm = Instance.new("SpecialMesh") hm.Parent = h hm.MeshType = "Brick" hm.Scale = Vector3.new(0.4, 1, 0.4) h2 = Instance.new("Part") h2.Parent = t h2.BrickColor = BrickColor.new(194) h2.Reflectance = 0 h2.Transparency = 0 h2.Name = "Handle2" h2.Position = Vector3.new(0,0,0) h2.Anchored = false h2.CanCollide = true h2.Locked = true h2.TopSurface = "Smooth" h2.BottomSurface = "Smooth" h2.Shape = 1 h2.Size = Vector3.new(1,1,1) h2.formFactor = 0 h2m = Instance.new("SpecialMesh") h2m.Parent = h2 h2m.MeshType = "Brick" h2m.Scale = Vector3.new(0.4, 0.4, 2) h3 = Instance.new("Part") h3.Parent = t h3.BrickColor = BrickColor.new(194) h3.Reflectance = 0 h3.Transparency = 0 h3.Name = "Handle3" h3.Position = Vector3.new(0,0,0) h3.Anchored = false h3.CanCollide = true h3.Locked = true h3.TopSurface = "Smooth" h3.BottomSurface = "Smooth" h3.Shape = 1 h3.Size = Vector3.new(1,1,1) h3.formFactor = 0 h3m = Instance.new("SpecialMesh") h3m.Parent = h3 h3m.MeshType = "Brick" h3m.Scale = Vector3.new(0.2, 0.3, 1) h4 = Instance.new("Part") h4.Parent = t h4.BrickColor = BrickColor.new(199) h4.Reflectance = 0 h4.Transparency = 0 h4.Name = "Handle4" h4.Position = Vector3.new(0,0,0) h4.Anchored = false h4.CanCollide = true h4.Locked = true h4.TopSurface = "Smooth" h4.BottomSurface = "Smooth" h4.Shape = 1 h4.Size = Vector3.new(1,1,1) h4.formFactor = 0 h4m = Instance.new("SpecialMesh") h4m.Parent = h4 h4m.MeshType ="Head" h4m.Scale = Vector3.new(0.1, 2, 0.1) h5 = Instance.new("Part") h5.Parent = t h5.BrickColor = BrickColor.new(21) h5.Reflectance = 0 h5.Transparency = 1 h5.Name = "Handle5" h5.Position = Vector3.new(0,0,0) h5.Anchored = false h5.CanCollide = true h5.Locked = true h5.TopSurface = "Smooth" h5.BottomSurface = "Smooth" h5.Shape = 1 h5.Size = Vector3.new(1,1,1) h5.formFactor = 0 h5m = Instance.new("SpecialMesh") h5m.Parent = h5 h5m.MeshType = "Sphere" h5m.Scale = Vector3.new(0.1, 0.5, 0.1) h6 = Instance.new("Part") h6.Parent = t h6.BrickColor = BrickColor.new(24) h6.Reflectance = 0 h6.Transparency = 1 h6.Name = "Handle6" h6.Position = Vector3.new(0,0,0) h6.Anchored = false h6.CanCollide = true h6.Locked = true h6.TopSurface = "Smooth" h6.BottomSurface = "Smooth" h6.Shape = 1 h6.Size = Vector3.new(1,1,1) h6.formFactor = 0 h6m = Instance.new("SpecialMesh") h6m.Parent = h6 h6m.MeshType = "Sphere" h6m.Scale = Vector3.new(0.2, 0.5, 0.2) sound1 = Instance.new("Sound") sound1.Parent = t.Handle sound1.SoundId = "39a3f2951eb980b2c6dff8cec6d6104d" sound1.Name = "Fire" soundc1 = sound1:Clone() sound1:Remove() soundc1.Parent = t.Handle sound2 = Instance.new("Sound") sound2.Parent = t.Parent sound2.SoundId = "http://www.roblox.com/asset/?id=2920960" sound2.Name = "Reload" soundc2 = sound2:Clone() sound2:Remove() soundc2.Parent = t.Handle Ammo = Instance.new("IntValue") Ammo.Parent = t Ammo.Value = 100 AmmoC = Ammo:Clone() Ammo:Remove() AmmoC.Parent = t AmmoC.Name = "Ammo" Clips = Instance.new("IntValue") Clips.Parent = t Clips.Value = 1 ClipsC = Clips:Clone() Clips:Remove() ClipsC.Parent = t ClipsC.Name = "Clips" s2 = Instance.new("Script") s2.Parent = t s2.Name = "GunScript" s2.Source = [[originalAmmo = script.Parent.Ammo.Value m = Instance.new("Message") function computeDirection(vec) local lenSquared = vec.magnitude^2 local invSqrt = 1 / math.sqrt(lenSquared) return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) end function updateAmmo() m.Text = "" --for i = 1,script.Parent.Ammo.Value do -- m.Text = m.Text .. "|" --end --for i = 1, (originalAmmo - script.Parent.Ammo.Value) do -- m.Text = m.Text .. " " --end m.Text = m.Text .. "" .. script.Parent.Ammo.Value.. "/100" end function fire(v) for i = 1,1 do script.Parent.Handle.Fire:play() script.Parent.Ammo.Value = script.Parent.Ammo.Value - 0 updateAmmo() local dir = v - script.Parent["Handle"].Position dir = computeDirection(dir) local pos = script.Parent["Handle"].Position + (dir * 8) local p = Instance.new("Part") p.Name = "Projectile" p.CFrame = CFrame.new(pos, pos + dir) p.BrickColor = BrickColor.new(21) p.Reflectance = 0 p.Velocity = (script.Parent.Parent["Head"].Position - v).unit * -500 p.Size = Vector3.new(1, 1, 1) p.formFactor = 0 local mesh = script.Parent.Mesh:clone() mesh.Parent = p local upforce = Instance.new("BodyForce") upforce.force = Vector3.new(0, p:GetMass() * 196, 0) upforce.Parent = p local s = script.Parent["ProjectileScript"]:Clone() s.Disabled = false s.Parent = p p.Parent = game.Workspace wait(0) end end function onActivated() if script.Parent.Enabled == true then --script.Parent.Enabled = false if script.Parent.Ammo.Value > 0 then fire(script.Parent.Parent["Humanoid"].TargetPoint) else if script.Parent.Clips.Value >= -30000000000000 then script.Parent.Enabled = false script.Parent.Handle.Reload:play() m.Text = "Reloading." for i =1,5 do wait(0.5) m.Text = m.Text .. "." end script.Parent.Clips.Value = script.Parent.Clips.Value - 1 script.Parent.Ammo.Value = originalAmmo updateAmmo() script.Parent.Enabled = true end if script.Parent.Clips.Value == 0 then m.Text = "Out Of Ammo" wait(1) m:Remove() script:Remove() end end wait(0.11) --script.Parent.Enabled = true end end function onEquipped() local p = game.Players:GetChildren() for i = 1,#p do if p[i].Character == script.Parent.Parent then m.Parent = p[i] end end updateAmmo() end function onUnequipped() m.Parent = nil end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) script.Parent.Unequipped:connect(onUnequipped) ]] s2c = s2:Clone() s2:Remove() s2c.Parent = t s8 = Instance.new("Script") s8.Parent = t s8.Name = "ProjectileScript" s8.Source = [[damage = 100 game:GetService("Debris"):AddItem(script.Parent, 8) function onTouched(hit) if hit.Parent:findFirstChild("Humanoid")~=nil then hit.Parent["Humanoid"]:TakeDamage(damage) end wait() script.Parent:Remove() end script.Parent.Touched:connect(onTouched) ]] s3 = Instance.new("Script") s3.Parent = t s3.Name = "Weld" s3.Source = [[local w1 = Instance.new("Weld") w1.Parent = script.Parent.Handle w1.Part0 = w1.Parent w1.Part1 = script.Parent.Handle2 w1.C1 = CFrame.fromEulerAnglesXYZ(-0.13, 0, 0) *CFrame.new(0, -0.5, 0.7) local w2 = Instance.new("Weld") w2.Parent = script.Parent.Handle w2.Part0 = w2.Parent w2.Part1 = script.Parent.Handle3 w2.C1 = CFrame.fromEulerAnglesXYZ(1, 0, 0) *CFrame.new(0, 0, 1.4) local w3 = Instance.new("Weld") w3.Parent = script.Parent.Handle2 w3.Part0 = w3.Parent w3.Part1 = script.Parent.Handle4 w3.C1 = CFrame.fromEulerAnglesXYZ(1.57, 0, 0) *CFrame.new(0, -0.05, 0.2) local w4 = Instance.new("Weld") w4.Parent = script.Parent.Handle4 w4.Part0 = w4.Parent w4.Part1 = script.Parent.Handle5 w4.C1 = CFrame.new(0, -1.1, 0) local w5 = Instance.new("Weld") w5.Parent = script.Parent.Handle5 w5.Part0 = w5.Parent w5.Part1 = script.Parent.Handle6 w5.C1 = CFrame.new(0, 0, 0) ]] s3c = s3:Clone() s3:Remove() s3c.Parent = t ls = Instance.new("LocalScript") ls.Parent = t ls.Name = "Local Gui" ls.Source = [[local Tool = script.Parent; fire = script.Parent.Handle5 fire2 = script.Parent.Handle6 enabled = true function onButton1Down(mouse) if not enabled then return end enabled = false mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" fire.Transparency = 0 fire2.Transparency = 0.5 wait(.1) mouse.Icon = "rbxasset://textures\\GunCursor.png" enabled = true fire.Transparency = 1 fire2.Transparency = 1 end function onEquippedLocal(mouse) if mouse == nil then print("Mouse not found") return end mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end Tool.Equipped:connect(onEquippedLocal) ]] lsc = ls:Clone() ls:Remove() lsc.Parent = t
Mario787
#4235175Friday, December 12, 2008 9:24 PM GMT

t = Instance.new("Tool") t.Parent = game.Players.superface.Backpack t.Name = "Machine Pistol" t.GripUp = Vector3.new(0, 0.99, 0.14) m = Instance.new("SpecialMesh") m.Parent = t m.MeshType = "Sphere" m.Scale = Vector3.new(0.1, 0.1, 0.1) h = Instance.new("Part") h.Parent = t h.BrickColor = BrickColor.new(194) h.Reflectance = 0 h.Transparency = 0 h.Name = "Handle" h.Position = Vector3.new(0,0,0) h.Anchored = false h.CanCollide = true h.Locked = true h.TopSurface = "Smooth" h.BottomSurface = "Smooth" h.Shape = 1 h.Size = Vector3.new(1,1,1) h.formFactor = 0 hm = Instance.new("SpecialMesh") hm.Parent = h hm.MeshType = "Brick" hm.Scale = Vector3.new(0.4, 1, 0.4) h2 = Instance.new("Part") h2.Parent = t h2.BrickColor = BrickColor.new(194) h2.Reflectance = 0 h2.Transparency = 0 h2.Name = "Handle2" h2.Position = Vector3.new(0,0,0) h2.Anchored = false h2.CanCollide = true h2.Locked = true h2.TopSurface = "Smooth" h2.BottomSurface = "Smooth" h2.Shape = 1 h2.Size = Vector3.new(1,1,1) h2.formFactor = 0 h2m = Instance.new("SpecialMesh") h2m.Parent = h2 h2m.MeshType = "Brick" h2m.Scale = Vector3.new(0.4, 0.4, 2) h3 = Instance.new("Part") h3.Parent = t h3.BrickColor = BrickColor.new(194) h3.Reflectance = 0 h3.Transparency = 0 h3.Name = "Handle3" h3.Position = Vector3.new(0,0,0) h3.Anchored = false h3.CanCollide = true h3.Locked = true h3.TopSurface = "Smooth" h3.BottomSurface = "Smooth" h3.Shape = 1 h3.Size = Vector3.new(1,1,1) h3.formFactor = 0 h3m = Instance.new("SpecialMesh") h3m.Parent = h3 h3m.MeshType = "Brick" h3m.Scale = Vector3.new(0.2, 0.3, 1) h4 = Instance.new("Part") h4.Parent = t h4.BrickColor = BrickColor.new(199) h4.Reflectance = 0 h4.Transparency = 0 h4.Name = "Handle4" h4.Position = Vector3.new(0,0,0) h4.Anchored = false h4.CanCollide = true h4.Locked = true h4.TopSurface = "Smooth" h4.BottomSurface = "Smooth" h4.Shape = 1 h4.Size = Vector3.new(1,1,1) h4.formFactor = 0 h4m = Instance.new("SpecialMesh") h4m.Parent = h4 h4m.MeshType ="Head" h4m.Scale = Vector3.new(0.1, 2, 0.1) h5 = Instance.new("Part") h5.Parent = t h5.BrickColor = BrickColor.new(21) h5.Reflectance = 0 h5.Transparency = 1 h5.Name = "Handle5" h5.Position = Vector3.new(0,0,0) h5.Anchored = false h5.CanCollide = true h5.Locked = true h5.TopSurface = "Smooth" h5.BottomSurface = "Smooth" h5.Shape = 1 h5.Size = Vector3.new(1,1,1) h5.formFactor = 0 h5m = Instance.new("SpecialMesh") h5m.Parent = h5 h5m.MeshType = "Sphere" h5m.Scale = Vector3.new(0.1, 0.5, 0.1) h6 = Instance.new("Part") h6.Parent = t h6.BrickColor = BrickColor.new(24) h6.Reflectance = 0 h6.Transparency = 1 h6.Name = "Handle6" h6.Position = Vector3.new(0,0,0) h6.Anchored = false h6.CanCollide = true h6.Locked = true h6.TopSurface = "Smooth" h6.BottomSurface = "Smooth" h6.Shape = 1 h6.Size = Vector3.new(1,1,1) h6.formFactor = 0 h6m = Instance.new("SpecialMesh") h6m.Parent = h6 h6m.MeshType = "Sphere" h6m.Scale = Vector3.new(0.2, 0.5, 0.2) sound1 = Instance.new("Sound") sound1.Parent = t.Handle sound1.SoundId = "39a3f2951eb980b2c6dff8cec6d6104d" sound1.Name = "Fire" soundc1 = sound1:Clone() sound1:Remove() soundc1.Parent = t.Handle sound2 = Instance.new("Sound") sound2.Parent = t.Parent sound2.SoundId = "http://www.roblox.com/asset/?id=2920960" sound2.Name = "Reload" soundc2 = sound2:Clone() sound2:Remove() soundc2.Parent = t.Handle Ammo = Instance.new("IntValue") Ammo.Parent = t Ammo.Value = 100 AmmoC = Ammo:Clone() Ammo:Remove() AmmoC.Parent = t AmmoC.Name = "Ammo" Clips = Instance.new("IntValue") Clips.Parent = t Clips.Value = 1 ClipsC = Clips:Clone() Clips:Remove() ClipsC.Parent = t ClipsC.Name = "Clips" s2 = Instance.new("Script") s2.Parent = t s2.Name = "GunScript" s2.Source = [[originalAmmo = script.Parent.Ammo.Value m = Instance.new("Message") function computeDirection(vec) local lenSquared = vec.magnitude^2 local invSqrt = 1 / math.sqrt(lenSquared) return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) end function updateAmmo() m.Text = "" --for i = 1,script.Parent.Ammo.Value do -- m.Text = m.Text .. "|" --end --for i = 1, (originalAmmo - script.Parent.Ammo.Value) do -- m.Text = m.Text .. " " --end m.Text = m.Text .. "" .. script.Parent.Ammo.Value.. "/100" end function fire(v) for i = 1,1 do script.Parent.Handle.Fire:play() script.Parent.Ammo.Value = script.Parent.Ammo.Value - 0 updateAmmo() local dir = v - script.Parent["Handle"].Position dir = computeDirection(dir) local pos = script.Parent["Handle"].Position + (dir * 8) local p = Instance.new("Part") p.Name = "Projectile" p.CFrame = CFrame.new(pos, pos + dir) p.BrickColor = BrickColor.new(21) p.Reflectance = 0 p.Velocity = (script.Parent.Parent["Head"].Position - v).unit * -500 p.Size = Vector3.new(1, 1, 1) p.formFactor = 0 local mesh = script.Parent.Mesh:clone() mesh.Parent = p local upforce = Instance.new("BodyForce") upforce.force = Vector3.new(0, p:GetMass() * 196, 0) upforce.Parent = p local s = script.Parent["ProjectileScript"]:Clone() s.Disabled = false s.Parent = p p.Parent = game.Workspace wait(0) end end function onActivated() if script.Parent.Enabled == true then --script.Parent.Enabled = false if script.Parent.Ammo.Value > 0 then fire(script.Parent.Parent["Humanoid"].TargetPoint) else if script.Parent.Clips.Value >= -30000000000000 then script.Parent.Enabled = false script.Parent.Handle.Reload:play() m.Text = "Reloading." for i =1,5 do wait(0.5) m.Text = m.Text .. "." end script.Parent.Clips.Value = script.Parent.Clips.Value - 1 script.Parent.Ammo.Value = originalAmmo updateAmmo() script.Parent.Enabled = true end if script.Parent.Clips.Value == 0 then m.Text = "Out Of Ammo" wait(1) m:Remove() script:Remove() end end wait(0.11) --script.Parent.Enabled = true end end function onEquipped() local p = game.Players:GetChildren() for i = 1,#p do if p[i].Character == script.Parent.Parent then m.Parent = p[i] end end updateAmmo() end function onUnequipped() m.Parent = nil end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) script.Parent.Unequipped:connect(onUnequipped) ]] s2c = s2:Clone() s2:Remove() s2c.Parent = t s8 = Instance.new("Script") s8.Parent = t s8.Name = "ProjectileScript" s8.Source = [[damage = 100 game:GetService("Debris"):AddItem(script.Parent, 8) function onTouched(hit) if hit.Parent:findFirstChild("Humanoid")~=nil then hit.Parent["Humanoid"]:TakeDamage(damage) end wait() script.Parent:Remove() end script.Parent.Touched:connect(onTouched) ]] s3 = Instance.new("Script") s3.Parent = t s3.Name = "Weld" s3.Source = [[local w1 = Instance.new("Weld") w1.Parent = script.Parent.Handle w1.Part0 = w1.Parent w1.Part1 = script.Parent.Handle2 w1.C1 = CFrame.fromEulerAnglesXYZ(-0.13, 0, 0) *CFrame.new(0, -0.5, 0.7) local w2 = Instance.new("Weld") w2.Parent = script.Parent.Handle w2.Part0 = w2.Parent w2.Part1 = script.Parent.Handle3 w2.C1 = CFrame.fromEulerAnglesXYZ(1, 0, 0) *CFrame.new(0, 0, 1.4) local w3 = Instance.new("Weld") w3.Parent = script.Parent.Handle2 w3.Part0 = w3.Parent w3.Part1 = script.Parent.Handle4 w3.C1 = CFrame.fromEulerAnglesXYZ(1.57, 0, 0) *CFrame.new(0, -0.05, 0.2) local w4 = Instance.new("Weld") w4.Parent = script.Parent.Handle4 w4.Part0 = w4.Parent w4.Part1 = script.Parent.Handle5 w4.C1 = CFrame.new(0, -1.1, 0) local w5 = Instance.new("Weld") w5.Parent = script.Parent.Handle5 w5.Part0 = w5.Parent w5.Part1 = script.Parent.Handle6 w5.C1 = CFrame.new(0, 0, 0) ]] s3c = s3:Clone() s3:Remove() s3c.Parent = t ls = Instance.new("LocalScript") ls.Parent = t ls.Name = "Local Gui" ls.Source = [[local Tool = script.Parent; fire = script.Parent.Handle5 fire2 = script.Parent.Handle6 enabled = true function onButton1Down(mouse) if not enabled then return end enabled = false mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" fire.Transparency = 0 fire2.Transparency = 0.5 wait(.1) mouse.Icon = "rbxasset://textures\\GunCursor.png" enabled = true fire.Transparency = 1 fire2.Transparency = 1 end function onEquippedLocal(mouse) if mouse == nil then print("Mouse not found") return end mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end Tool.Equipped:connect(onEquippedLocal) ]] lsc = ls:Clone() ls:Remove() lsc.Parent = t
spork890
#4235564Friday, December 12, 2008 9:41 PM GMT

Spam.

    of     1