badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 22 Aug 2015 02:20 PM |
m.Button1Down:connect(function() for _, v2 in pairs(plr.Character:GetChildren()) do if guns[v2.Name] and not reloading and v2.Ammo.Value > -1 then mdown = true if guns[v2.Name]["GunType"] == "Auto" then while mdown and not reloading and not db and v2.Ammo.Value >= -1 do wait(guns[v2.Name]["Firerate"]/10) shotsfired = shotsfired + .2 fire(v2, m.Hit.p) v2.Handle.Fire:Play() end else shotsfired = shotsfired + .2 fire(v2, m.Hit.p) v2.Handle.Fire:Play() end elseif guns[v2.Name] and v2.Ammo.Value <=0 and v2.Mags.Value == 0 then script.Sound:Play() end end end)
m.Button1Up:connect(function() mdown = false end)
fire is irrelevant, it just creates the ray.
When firing an automatic gun, if I were to spam click and then hold down, the firing would be incredibly fast.
JumbleBee5 wrote at 4/10/2014 11:39 AM Report Abuse nice yolks honey ( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 22 Aug 2015 02:21 PM |
never mind, i seem to of fixed it.
JumbleBee5 wrote at 4/10/2014 11:39 AM Report Abuse nice yolks honey ( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 22 Aug 2015 07:28 PM |
never mind, it's not working. same problem
JumbleBee5 wrote at 4/10/2014 11:39 AM Report Abuse nice yolks honey ( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
lokkut
|
  |
| Joined: 18 Mar 2009 |
| Total Posts: 1794 |
|
|
| 22 Aug 2015 07:29 PM |
local mdown = false mouse.Button1Down:connect(function() mdown = true repeat shoot() until mdown == false end)
mouse.Button1Up:connect(function() mdown = false end) |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 22 Aug 2015 07:38 PM |
literally the same thing but with a different loop.
JumbleBee5 wrote at 4/10/2014 11:39 AM Report Abuse nice yolks honey ( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|