generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

How does one develop a proper value cap?

Previous Thread :: Next Thread 
BrockRocksYourSocks is not online. BrockRocksYourSocks
Joined: 22 Nov 2009
Total Posts: 5338
15 Aug 2012 12:29 PM
running = false
debounce = true

function speedBoost(v)
wait()
v = v + 1
end

function sprintCheck(sp, bool)
if sp == 16 then
wait(5)
bool = true
end
end

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
h = character:findFirstChild("Humanoid")
if h ~= nil then
h.WalkSpeed = 1
h.Running:connect(function(speed)
if speed >= 1 then
speedBoost(h.Speed)
elseif speed < 1 then
h.WalkSpeed = 1
end
end)

h.Changed:connect(function(prop)
if prop == "WalkSpeed" then
if h.WalkSpeed == 17 and running == false and debounce == true then
h.WalkSpeed = 16
debounce = false
wait(3)
sprintCheck(h.WalkSpeed, running)
elseif h.WalkSpeed == 1 and debounce == false then
debounce = true
end
end
end)
end
end)
end)

I could use a <= or => iterator, but that conflicts with my Anti-Exploit, which kicks anyone with over 32 WalkSpeed.

Anyone?
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
15 Aug 2012 12:36 PM
How does using => or <= conflict with that?
Report Abuse
BrockRocksYourSocks is not online. BrockRocksYourSocks
Joined: 22 Nov 2009
Total Posts: 5338
15 Aug 2012 12:40 PM
if prop == "Health" then
if human.Health >= 1001 then
ban(character, banlist)
end
elseif prop == "WalkSpeed" then
if human.WalkSpeed >= 33 then
ban(character, banlist)
end
end


This code is from the anti-exploit
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
15 Aug 2012 12:42 PM
Well " =>" wouldn't work.

† KMXD †
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image