Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Lesson for xJDiviisionZ
- plr = game.Players.LocalPlayer --Variable
- plr.Character.Humanoid.Animator:Destroy() --Destroy anim (if idle changed)
- local t = Instance.new('Sound' ,game.Workspace) --(Variable making sound + properties if need.)
- t.SoundId = 'http://www.roblox.com/asset/?id=2248511' --(Selecting the sound from roblox/develop/library*Sounds/(ID)
- local Mouse = plr:GetMouse() --(Getmous)
- Mouse.KeyDown:connect(function(Key) --Function
- Key = Key:lower() --(getting keys)
- if Key == 'e' then --which button pressed
- plr.Character.Humanoid.WalkSpeed = 100
- local h = Instance.new('Part' ,game.Workspace) --making part
- h.Material = 'Neon' --properties from variable 'h'
- h.CanCollide = false
- h.Name = 'Bullet'
- h.BrickColor = BrickColor.new('Lime green')
- h.Size = Vector3.new(1,1,4)
- h.Anchored = true
- h.CFrame = plr.Character.Torso.CFrame * CFrame.new(0,0,-4.3)
- local function ontouch(hit) --when touched (what it hits)
- local r = Instance.new('Explosion' ,game.Workspace) --making explosion
- r.ExplosionType = 'NoCraters' --properties of variable r
- r.BlastRadius = 0
- r.Position = Vector3.new(h.Position.X,h.Position.Y,h.Position.Z)
- h:Destroy() --Destroying the variable
- hit.Parent.Humanoid.Health = 0
- hit:BreakJoints() --breaking joint
- t.Playing = true
- end
- h.Touched:connect(ontouch)
- while true do wait()
- h.CFrame = h.CFrame * CFrame.new(0,0,-3.4)
- end
- end
- end)
- local Mouse = plr:GetMouse() --(Getmous)
- Mouse.KeyDown:connect(function(Key) --Function
- Key = Key:lower() --(getting keys)
- if Key == 'q' then --which button pressed
- plr.Character.Humanoid.WalkSpeed = 100
- local a = Instance.new('Part' ,game.Workspace) --making part
- a.Material = 'Neon' --properties from variable 'h'
- a.CanCollide = false
- a.Name = 'Bullet'
- a.BrickColor = BrickColor.new('Really red')
- a.Size = Vector3.new(1,1,4)
- a.Anchored = true
- a.CFrame = plr.Character.Torso.CFrame * CFrame.new(0,0,-4.3)
- local function ontouch(hit) --when touched (what it hits)
- local o = Instance.new('Explosion' ,game.Workspace) --making explosion
- o.ExplosionType = 'NoCraters' --properties of variable r
- o.BlastRadius = 0
- o.Position = Vector3.new(a.Position.X,a.Position.Y,a.Position.Z)
- a:Destroy() --Destroying the variable
- hit.Parent.Humanoid.Health = 0
- hit:BreakJoints() --breaking joint
- t.Playing = true
- end
- a.Touched:connect(ontouch)
- while true do wait()
- a.CFrame = a.CFrame * CFrame.new(0,0,-3.4)
- end
- end
- end)
- local Player = game:FindService("Players").LocalPlayer
- local Mouse = Player:GetMouse()
- Mouse.Button1Up:connect(function()
- local Part = Mouse.Target
- if Part then
- local h = Instance.new('Explosion' ,game.Workspace)
- h.BlastPressure = 500000
- h.BlastRadius = 8
- h.Position = Vector3.new(Mouse.Hit.p.X,Mouse.Hit.p.Y,Mouse.Hit.p.Z)
- end
- end)
- --CREDITS ScriptingLua_LuaTeam
Advertisement
Add Comment
Please, Sign In to add comment