Fliere88
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 16 |
|
|
| 27 Jul 2014 04:44 AM |
Hey guys!
I use a script from youtubes it is called the mouse sesetivite script. can anyone help me with it so the script only will be activated by clicking and holding the right button and it will deactivate the script if you release? here is the total script copied.
--Made by YouTubes _G.MouseSensitivity = 0.2 _G.MouseSensitivityOffset = 0
--[[ step 1: put this script in the starter gui step 2: wherever you have aiming where you waant to change mouse sensitivity put _G.MouseSensitivity = 0.5 or something step 3: love youtubes forever (this script is powered by love it's the most important step!) ]]
-- this is a fairly old script lol -- only releasing this cause i let someone use it and their game got exploited and the script was released by the silly skid who stole the game (wow, way to go roblox!) -- this is actually camera sensitivity, it doesn't affect the mouse, but in first person it is the same thing -- thanks for having useless security roblox :) -- seriously though, roblox... if skiddies can steal places you can fix it easily, i'm sure -- really, you're being incredibly pathetic -- in truth i don't care too much about this considering i probably spent more time thinking about how to make it than making it -- i actually used that one script "MouseJello plugin" or whatever by one of those team rudementality dev guys for inspiration -- don't recommend taking credit for this if you don't know how to script very well, you'll be very uncredible :)
repeat Wait() until Game.Players.LocalPlayer local Player = Game.Players.LocalPlayer repeat Wait() until Workspace.CurrentCamera local Camera = Workspace.CurrentCamera repeat Wait() until Player:GetMouse() local Mouse = Player:GetMouse()
function RotateCamera(x, y) Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(x, y, 0) * CFrame.new(0, 0, (Camera.CoordinateFrame.p - Camera.Focus.p).magnitude) end
function GetAngles(cf) local lv = cf.lookVector return -math.asin(lv.y), math.atan2(lv.x, -lv.z) end
local LastCF = Camera.CoordinateFrame
function UpdateSensitivity() if _G.MouseSensitivity ~= 1 then -- no need to do this if it's 1 local x, y = GetAngles(LastCF:toObjectSpace(Camera.CoordinateFrame)) Camera.CoordinateFrame = LastCF RotateCamera(x * -(_G.MouseSensitivity + _G.MouseSensitivityOffset), y * -(_G.MouseSensitivity + _G.MouseSensitivityOffset)) LastCF = Camera.CoordinateFrame end end
Mouse.Move:connect(function() UpdateSensitivity() end)
Mouse.Idle:connect(function() LastCF = Camera.CoordinateFrame end)
-- end of the script yep like 30 lines lol... enjoy
so can anyone help me with that? |
|
|
| Report Abuse |
|
Fliere88
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 16 |
|
|
| 27 Jul 2014 04:45 AM |
| oh forgot to say it must be the right mouse button. |
|
|
| Report Abuse |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 27 Jul 2014 05:22 AM |
make a shoot function
while a certain value is true, make it fire the shoot function.
make the value true depending if the button is down or not. |
|
|
| Report Abuse |
|